code: def test_efficient_det_build_infer_batch(records, img):
      batch, records = efficientdet.build_infer_batch(records)
  
      tensor_img = torch.stack([im2tensor(img), im2tensor(img)])
      img_sizes = tensor([(4, 4), (4, 4)], dtype=torch.float)
      img_scales = tensor([1, 1], dtype=torch.float)
      img_info = {"img_size": img_sizes, "img_scale": img_scales}
  
      batch_imgs, batch_info = batch
  
      assert set(batch_info.keys()) == {"img_size", "img_scale"}
      assert torch.equal(batch_imgs, tensor_img)
      assert torch.equal(batch_info["img_size"], img_info["img_size"])
      assert torch.equal(batch_info["img_scale"], img_info["img_scale"])
  
file_path: icevision/tests/models/efficient_det/test_dataloaders.py
imports: import pytest
  from icevision.all import *
  from icevision.models.ross import efficientdet
label_desc: Use image node_id 12 for calling a global function with example usage: test_efficient_det_build_infer_batch(records, img) without return types