code: def test_build_batch_dataloader_inference(self):
      # Test that build_batch_data_loader can be used for inference
      N = 96
      ds = DatasetFromList(list(range(N)))
      sampler = InferenceSampler(len(ds))
      dl = build_batch_data_loader(ds, sampler, 8, num_workers=3)
      self._check_is_range(dl, N)
  
imports: import os
  import pickle
  import sys
  import unittest
  from functools import partial
  import torch
  from iopath.common.file_io import LazyPath
  from detectron2 import model_zoo
  from detectron2.config import get_cfg, instantiate
  from detectron2.data import DatasetCatalog, DatasetFromList, MapDataset, ToIterableDataset, build_batch_data_loader, build_detection_test_loader, build_detection_train_loader
  from detectron2.data.common import AspectRatioGroupedDataset, set_default_dataset_from_list_serialize_method
  from detectron2.data.samplers import InferenceSampler, TrainingSampler
label_desc: Use image node_id 6 for calling the TestDataLoader obj's underlying member method code with example usage: obj.test_build_batch_dataloader_inference() without return types