This pull originally resolved a code TO-DO, as well as fixing different param names between the function declaration and definition, updating the function to current style standards, clearer variable naming, and improving the Doxygen documentation.
Following the merge of #17160, it now does the non-TODO changes and also now drops an unused param to simplify the function.