code: def build_infer_batch(records: Sequence[RecordType]):
      """Builds a batch in the format required by the model when doing inference.
  
      # Arguments
          records: A `Sequence` of records.
  
      # 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 an updated list
          of the input records.
  
      # Examples
  
      Use the result of this function to feed the model.
      ```python
      batch, records = build_infer_batch(records)
      outs = model(*batch)
      ```
      """
      tensor_imgs = [im2tensor(record.img) for record in records]
      tensor_imgs = torch.stack(tensor_imgs)
  
      return (tensor_imgs,), records
  
file_path: icevision/icevision/models/ultralytics/yolov5/dataloaders.py
imports: from icevision.imports import *
  from icevision.core import *
  from icevision.models.utils import *
label_desc: Use image node_id 7 for calling a global function with example usage: build_infer_batch(records) and returns: tensor_imgs,  records