ensure function classes are not shadowed
Ensure the _FunctionGenerator method do not shadow the function class
of the same name
Fixed a typing issue where the typed members of :data:`.func` would return
the appropriate class of the same name, however this creates an issue for
typecheckers such as Zuban and pyrefly that assume :pep:`749` style
typechecking even if the file states that it's a :pep:`563` file; they see
the returned name as indicating the method object and not the class object.
These typecheckers are actually following along with an upcoming test
harness that insists on :pep:`749` style name resolution for this case
unconditionally. Since :pep:`749` is the way of the future regardless,
differently-named type aliases have been added for these return types.
Fixes: #13167
Change-Id: If58a3858001c78ab21b2ed343205dfd9ce868576
(cherry picked from commit
0a185a3bb6347719ffab60012db8fbbc23eb29e4)