Defines a union object which holds types X, Y, and so forth. X | Y means either X or Y. It is equivalent to typing.Union[X, Y]. For example, the following function expects an argument of type int or float:
X | Y | ...
def square(number: int | float) -> int | float:
return number ** 2