code: def build_infer_batch(records):
      """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 a list
          of the input records.
      Use the result of this function to feed the model.
      ```python
      batch, records = build_infer_batch(records)
      outs = model(*batch)
      ```
      """
      batch_images, batch_sizes, batch_scales = zip(
          *(process_infer_record(record) for record in records)
      )
  
      # convert to tensors
      batch_images = torch.stack(batch_images)
      batch_sizes = tensor(batch_sizes, dtype=torch.float32)
      batch_scales = tensor(batch_scales, dtype=torch.float32)
  
      # convert to EffDet interface
      targets = dict(img_size=batch_sizes, img_scale=batch_scales)
  
      return (batch_images, targets), records
  
file_path: icevision/icevision/models/ross/efficientdet/dataloaders.py
imports: from icevision.imports import *
  from icevision.models.utils import *
label_desc: Use image node_id 6 for calling a global function with example usage: build_infer_batch(records) and returns: batch_images,  targets,  records