code: def test_coco_dataset(self):
      # test CocoDataset
      metainfo = dict(classes=("bus", "car"), task_name="new_task")
      dataset = CocoDataset(
          data_prefix=dict(img="imgs"),
          ann_file="tests/data/coco_sample.json",
          metainfo=metainfo,
          filter_cfg=dict(filter_empty_gt=True, min_size=32),
          pipeline=[],
          serialize_data=False,
          lazy_init=False,
      )
      self.assertEqual(dataset.metainfo["classes"], ("bus", "car"))
      self.assertEqual(dataset.metainfo["task_name"], "new_task")
      self.assertListEqual(dataset.get_cat_ids(0), [0, 1])
  
imports: import unittest
  from mmdet.datasets import CocoDataset
label_desc: Use image node_id 1 for calling the TestCocoDataset obj's underlying member method code with example usage: obj.test_coco_dataset() without return types