code: def build_valid_batch(
      records: List[RecordType],
  ) -> Tuple[List[torch.Tensor], List[Dict[str, torch.Tensor]]]:
      """Builds a batch in the format required by the model when validating.
  
      # Arguments
          records: A `Sequence` of records.
          batch_tfms: Transforms to be applied at the batch level.
  
      # Returns
          A tuple with two items. The first will be a tuple like `(images, targets)`,
          in the input format required by the model. The second will be a list
          of the input records.
  
      # Examples
  
      Use the result of this function to feed the model.
      ```python
      batch, records = build_valid_batch(records)
      outs = model(*batch)
      ```
      """
      return build_train_batch(records=records)
  
file_path: icevision/icevision/models/torchvision/mask_rcnn/dataloaders.py
imports: from icevision.imports import *
  from icevision.core import *
  from icevision.models.utils import *
  from icevision.models.torchvision.dataloaders import _build_train_sample
  from icevision.models.torchvision.dataloaders import build_infer_batch, infer_dl
label_desc: Use image node_id 5 for calling a global function with example usage: build_valid_batch(records) and returns: build_train_batch