keras/src/random/seed_generator.py/draw_seed
def draw_seed(seed):
    from keras.src.backend import convert_to_tensor
    from keras.src.backend import random_seed_dtype

    if isinstance(seed, SeedGenerator):
        return seed.next()
    elif isinstance(seed, int):
        return convert_to_tensor([seed, 0], dtype=random_seed_dtype())
    elif seed is None:
        return global_seed_generator().next(ordered=False)
    raise ValueError(
        "Argument `seed` must be either an integer "
        "or an instance of `SeedGenerator`. "
        f"Received: seed={seed} (of type {type(seed)})"
    )