code: def __verify_batch_transfer_support(trainer: "pl.Trainer") -> None:
      batch_transfer_hooks = (
          "transfer_batch_to_device",
          "on_after_batch_transfer",
      )
      datahook_selector = trainer._data_connector._datahook_selector
      assert datahook_selector is not None
      for hook in batch_transfer_hooks:
          if _graphcore_available_and_importable():
              from lightning_graphcore import IPUAccelerator
  
              # TODO: This code could be done in a hook in the IPUAccelerator as it's a simple error check
              #  through the Trainer. It doesn't need to stay in Lightning
              if isinstance(trainer.accelerator, IPUAccelerator) and (
                  is_overridden(hook, datahook_selector.model)
                  or is_overridden(hook, datahook_selector.datamodule)
              ):
                  raise MisconfigurationException(
                      f"Overriding `{hook}` is not supported with IPUs."
                  )
  
file_path: pytorch-lightning/src/lightning/pytorch/trainer/configuration_validator.py
imports: import lightning.pytorch
  from lightning.fabric.utilities.warnings import PossibleUserWarning
  from lightning.pytorch.trainer.states import TrainerFn
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.imports import _graphcore_available_and_importable
  from lightning.pytorch.utilities.model_helpers import is_overridden
  from lightning.pytorch.utilities.rank_zero import rank_zero_deprecation, rank_zero_warn
  from lightning.pytorch.utilities.signature_utils import is_param_in_hook_signature
label_desc: Use image node_id 4 for calling a global function with example usage: __verify_batch_transfer_support(trainer) without return types