stubgen: Don't annotate unknown argument and return types (#10626)
### Description
Don't annotate unknown argument and return types with explicit `Any`. Also, fix formatting of functions that have an explicit type and default argument.
## Test Plan
I adapted the existing tests. I also added tests to ensure that explicit `Any`s remain in the stub. I also added a test for the formatting fix.