NewType() accepts an unique type parameter. To specialize the function for different types for static typing, you only need a TypeVar here.
NewType()
TypeVar
Example: Read https://dev.to/decorator_factory/typevars-explained-hmo