class_docstr: Top-level loop where validation/testing starts.
docstr: Helper method to build the arguments for the current step.
  
  Args:
      batch: the current batch to run through the step.
      batch_idx: the index of the current batch.
      dataloader_idx: the index of the dataloader producing the current batch. None if not multiple dataloaders
          in sequential mode.
  
  Returns:
      the dictionary containing all the keyboard arguments for the step
docstr_tok: ["Helper","method","to","build","the","arguments","for","the","current","step",".","Args",":","batch",":","the","current","batch","to","run","through","the","step",".","batch_idx",":","the","index","of","the","current","batch",".","dataloader_idx",":","the","index","of","the","dataloader","producing","the","current","batch",".","None","if","not","multiple","dataloaders","in","sequential","mode",".","Returns",":","the","dictionary","containing","all","the","keyboard","arguments","for","the","step"]
code: def _build_kwargs(
      self, batch: Any, batch_idx: int, dataloader_idx: Optional[int]
  ) -> OrderedDict:
      """Helper method to build the arguments for the current step.
  
      Args:
          batch: the current batch to run through the step.
          batch_idx: the index of the current batch.
          dataloader_idx: the index of the dataloader producing the current batch. None if not multiple dataloaders
              in sequential mode.
  
      Returns:
          the dictionary containing all the keyboard arguments for the step
  
      """
      step_kwargs = OrderedDict(
          [("batch", batch), ("batch_idx", batch_idx)]
      )
      if dataloader_idx is not None:
          step_kwargs["dataloader_idx"] = dataloader_idx
      return step_kwargs
  
imports: import os
  import shutil
  import sys
  from collections import ChainMap, OrderedDict, defaultdict
  from typing import Any, DefaultDict, Iterable, Iterator, List, Optional, Tuple, Union
  from lightning_utilities.core.apply_func import apply_to_collection
  from torch import Tensor
  import lightning.pytorch
  from lightning.fabric.utilities.data import _set_sampler_epoch
  from lightning.pytorch.callbacks.progress.rich_progress import _RICH_AVAILABLE
  from lightning.pytorch.loops.fetchers import _DataFetcher, _DataLoaderIterDataFetcher
  from lightning.pytorch.loops.loop import _Loop
  from lightning.pytorch.loops.progress import _BatchProgress
  from lightning.pytorch.loops.utilities import _no_grad_context, _select_data_fetcher, _verify_dataloader_idx_requirement
  from lightning.pytorch.trainer import call
  from lightning.pytorch.trainer.connectors.data_connector import _check_dataloader_iterable, _DataLoaderSource, _parse_num_batches, _process_dataloader, _request_dataloader, _resolve_overfit_batches
  from lightning.pytorch.trainer.connectors.logger_connector.result import _OUT_DICT, _ResultCollection
  from lightning.pytorch.trainer.states import RunningStage, TrainerFn
  from lightning.pytorch.utilities.combined_loader import CombinedLoader
  from lightning.pytorch.utilities.data import has_len_all_ranks
  from lightning.pytorch.utilities.exceptions import SIGTERMException
  from lightning.pytorch.utilities.model_helpers import _ModuleMode, is_overridden
  from lightning.pytorch.utilities.signature_utils import is_param_in_hook_signature
label_desc: Use image node_id 23 for calling the _EvaluationLoop obj's underlying member method code with example usage: obj._build_kwargs(batch, batch_idx, dataloader_idx) and returns: step_kwargs