def create_device_input_transform_processor(
    running_stage: RunningStage, input_transform: InputTransform
) -> _InputTransformProcessor:
    """This utility is used to create a `_InputTransformProcessor` object which contain the transforms used as the
    DataModule `on_after_batch_transfer` hook."""
    _, device_collate_fn = __configure_worker_and_device_collate_fn(
        running_stage=running_stage, input_transform=input_transform
    )
    return _InputTransformProcessor(
        input_transform,
        device_collate_fn,
        input_transform._per_sample_transform_on_device,
        input_transform._per_batch_transform_on_device,
        running_stage,
        apply_per_sample_transform=device_collate_fn != input_transform._identity,
        on_device=True,
    )
This utility is used to create a `_InputTransformProcessor` object which contain the transforms used as the
    DataModule `on_after_batch_transfer` hook.
src/flash/core/data/io/input_transform.py