code: 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,
      )
  
imports: import inspect
  from dataclasses import dataclass
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
  from pytorch_lightning.utilities import rank_zero_warn
  from pytorch_lightning.utilities.enums import LightningEnum
  from flash.core.data.callback import ControlFlow
  from flash.core.data.utilities.collate import default_collate
  from flash.core.data.utils import _STAGES_PREFIX
  from flash.core.utilities.stages import RunningStage
  from flash.core.utilities.types import INPUT_TRANSFORM_TYPE
label_desc: Use image node_id 5 for calling a global function with example usage: create_device_input_transform_processor(running_stage, input_transform) and returns: _InputTransformProcessor