# Union typing can be used like this: Union[int, str] # In function defintion it would look like this: def func(x: Union[int, str]) -> Union[int, str]: ...