def generate_example_for_union(type_: Any) -> Any:
    """
    Generates a pydantic example for Union[X, Y, ...].
    Note that Optional can also be set as Union[X, None]
    """
    values = tuple(
        get_pydantic_example_repr(x) for x in type_.__args__ if x is not type(None)
    )
    return values[0] if len(values) == 1 else values

    Generates a pydantic example for Union[X, Y, ...].
    Note that Optional can also be set as Union[X, None]
    
ormar/models/helpers/validation.py