code: def _check_tuner_configuration(
      train_dataloaders: Optional[
          Union[TRAIN_DATALOADERS, "pl.LightningDataModule"]
      ] = None,
      val_dataloaders: Optional[EVAL_DATALOADERS] = None,
      dataloaders: Optional[EVAL_DATALOADERS] = None,
      method: Literal["fit", "validate", "test", "predict"] = "fit",
  ) -> None:
      supported_methods = ("fit", "validate", "test", "predict")
      if method not in supported_methods:
          raise ValueError(
              f"method {method!r} is invalid. Should be one of {supported_methods}."
          )
  
      if method == "fit":
          if dataloaders is not None:
              raise MisconfigurationException(
                  f"In tuner with method={method!r}, `dataloaders` argument should be None,"
                  " please consider setting `train_dataloaders` and `val_dataloaders` instead."
              )
      else:
          if (
              train_dataloaders is not None
              or val_dataloaders is not None
          ):
              raise MisconfigurationException(
                  f"In tuner with `method`={method!r}, `train_dataloaders` and `val_dataloaders`"
                  " arguments should be None, please consider setting `dataloaders` instead."
              )
  
file_path: pytorch-lightning/src/lightning/pytorch/tuner/tuning.py
imports: from typing import TYPE_CHECKING, Literal, Optional, Union
  import lightning.pytorch
  from lightning.pytorch.callbacks.callback import Callback
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.types import EVAL_DATALOADERS, TRAIN_DATALOADERS
label_desc: Use image node_id 1 for calling a global function with example usage: _check_tuner_configuration(train_dataloaders, val_dataloaders, dataloaders, method) without return types