def uuid_validator(v) -> UUID:
    if isinstance(v, UUID):
        return v
    elif isinstance(v, str):
        return UUID(v)
    elif isinstance(v, (bytes, bytearray)):
        return UUID(v.decode())
    else:
        raise ValueError(f'str, byte or native UUID type expected not {type(v)}')
def uuid_validator(v) -> UUID:
    if isinstance(v, UUID):
        return v
    elif isinstance(v, str):
        return UUID(v)
    elif isinstance(v, (bytes, bytearray)):
        return UUID(v.decode())
    else:
        raise ValueError(f'str, byte or native UUID type expected not {type(v)}')