from typing import AnyStr, Callable def my_function(name: AnyStr, func: Callable[[ParamType1, ParamType2, .., ParamTypeN], ReturnType] ) -> None: ...