code: def __check_transforms(
      self, transform: Dict[str, Callable]
  ) -> Tuple[Dict[str, Callable], Optional[bool]]:
      is_per_batch_transform_in = "per_batch_transform" in transform
      is_per_sample_transform_on_device_in = (
          "per_sample_transform_on_device" in transform
      )
  
      if (
          is_per_batch_transform_in
          and is_per_sample_transform_on_device_in
      ):
          raise TypeError(
              f"{transform}: `per_batch_transform` and `per_sample_transform_on_device` are mutually exclusive."
          )
  
      collate_in_worker: Optional[
          bool
      ] = not is_per_sample_transform_on_device_in
  
      return transform, collate_in_worker
  
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 41 for calling the InputTransform obj's underlying member method code with example usage: obj.__check_transforms(transform) and returns: transform,  collate_in_worker