from typing import Union def foo() -> Union[int, None, str]: return 42