docstr: Generate batch data samples including model inputs and gt labels.
docstr_tok: ["Generate","batch","data","samples","including","model","inputs","and","gt","labels","."]
code: def get_batch_data_samples(self):
      """Generate batch data samples including model inputs and gt labels."""
      data_sample_file_path = "tests/data/coco_batched_sample.json"
  
      with open(data_sample_file_path, "r") as file_stream:
          data_sample_infos = json.load(file_stream)
  
      batch_data_samples = []
  
      for data_sample_info in data_sample_infos:
          data_sample = DetDataSample()
  
          metainfo = data_sample_info["metainfo"]
          labels = data_sample_info["labels"]
          bboxes = data_sample_info["bboxes"]
  
          data_sample.set_metainfo(metainfo)
  
          gt_instances = InstanceData()
          gt_instances.labels = torch.LongTensor(labels)
          gt_instances.bboxes = torch.Tensor(bboxes)
          data_sample.gt_instances = gt_instances
  
          batch_data_samples.append(data_sample)
  
      return batch_data_samples
  
file_path: mmdetection/tests/test_models/test_detectors/test_ddq_detr.py
imports: import json
  from unittest import TestCase
  import torch
  from mmengine.structures import InstanceData
  from mmdet.registry import MODELS
  from mmdet.structures import DetDataSample
  from mmdet.testing import get_detector_cfg
  from mmdet.utils import register_all_modules
label_desc: Use image node_id 3 for calling the TestDDQDETR obj's underlying member method code with example usage: obj.get_batch_data_samples() and returns: batch_data_samples