code: def __verify_configure_model_configuration(
      model: "pl.LightningModule",
  ) -> None:
      if is_overridden("configure_sharded_model", model):
          name = type(model).__name__
          if is_overridden("configure_model", model):
              raise RuntimeError(
                  f"Both `{name}.configure_model`, and `{name}.configure_sharded_model` are overridden. The latter is"
                  f" deprecated and it should be replaced with the former."
              )
          rank_zero_deprecation(
              f"You have overridden `{name}.configure_sharded_model` which is deprecated. Please override the"
              " `configure_model` hook instead. Instantiation with the newer hook will be created on the device right"
              " away and have the right data type depending on the precision setting in the Trainer."
          )
  
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 7 for calling a global function with example usage: __verify_configure_model_configuration(model) without return types