code: def test_bbox_dataloader(fridge_ds, fridge_class_map):
      train_ds, _ = fridge_ds
      train_dl = models.mmdet.faster_rcnn.train_dl(
          train_ds, batch_size=2, num_workers=0, shuffle=False
      )
      data, recs = first(train_dl)
  
      assert set(data.keys()) == {
          "gt_bboxes",
          "gt_labels",
          "img",
          "img_metas",
      }
      assert (
          (np.array(recs[0].detection.label_ids) - 1)
          == data["gt_labels"][0].numpy()
      ).all()
      assert (
          (np.array(recs[1].detection.label_ids) - 1)
          == data["gt_labels"][1].numpy()
      ).all()
      assert data["img_metas"][0]["img_shape"] == (384, 384, 3)
      assert data["img_metas"][1]["pad_shape"] == (384, 384, 3)
      assert (
          data["img_metas"][1]["scale_factor"]
          == np.array([1.0, 1.0, 1.0, 1.0])
      ).all()
      assert recs[0].detection.class_map == fridge_class_map
      assert recs[1].detection.class_map == fridge_class_map
  
file_path: icevision/tests/models/mmdet/test_dataloaders.py
imports: import pytest
  from icevision.all import *
label_desc: Use image node_id 7 for calling a global function with example usage: test_bbox_dataloader(fridge_ds, fridge_class_map) without return types