code: def create_or_configure_input_transform(
      transform: INPUT_TRANSFORM_TYPE,
      transform_kwargs: Optional[Dict] = None,
  ) -> Optional[InputTransform]:
      if not transform_kwargs:
          transform_kwargs = {}
  
      if isinstance(transform, InputTransform):
          return transform
  
      if inspect.isclass(transform) and issubclass(
          transform, InputTransform
      ):
          # Deprecation Warning
          rank_zero_warn(
              "Please pass an instantiated object of the `InputTransform` class. Passing the Class and keyword arguments"
              " separately has been deprecated since v0.8.0 and will be removed in v0.9.0.",
              stacklevel=8,
              category=FutureWarning,
          )
          return transform(**transform_kwargs)
  
      if isinstance(transform, partial):
          return transform(**transform_kwargs)
  
      if not transform:
          return None
  
      raise ValueError(
          f"The format for the transform isn't correct. Found {transform}"
      )
  
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 1 for calling a global function with example usage: create_or_configure_input_transform(transform, transform_kwargs) and returns: transform, transform, transform, None