def METHOD_NAME(
    x: np.ndarray,
    y: np.ndarray,
    num_classes: int,
    shuffle_buffer_size: int = 0,
    augment: bool = False,
    augment_color: bool = False,
    augment_horizontal_flip: bool = False,
    augment_offset: int = 0,
    seed: Optional[int] = None,
    normalization_factor: float = 255.0,
) -> tf.data.Dataset:
    """Normalize images, one-hot encode labels, optionally shuffle and
    augment."""
    dataset = tf.data.Dataset.from_tensor_slices((x, y))
    dataset = dataset.map(
        lambda x, y: (
            tf.cast(x, tf.float32) / normalization_factor,
            tf.one_hot(
                indices=tf.cast(y, tf.int32), depth=num_classes, on_value=1, off_value=0
            ),
        ),
        num_parallel_calls=tf.data.experimental.AUTOTUNE,
    )
    if shuffle_buffer_size > 0:
        dataset = dataset.shuffle(
            buffer_size=shuffle_buffer_size, seed=seed, reshuffle_each_iteration=True
        )
    if augment:
        dataset = dataset.map(
            lambda x, y: (
                apply_augmentation(
                    x,
                    seed=seed,
                    color=augment_color,
                    horizontal_flip=augment_horizontal_flip,
                    offset=augment_offset,
                ),
                y,
            ),
            num_parallel_calls=tf.data.experimental.AUTOTUNE,
        )
    return dataset