code: def test_init(self):
      meta_info = dict(
          img_size=[256, 256],
          scale_factor=np.array([1.5, 1.5]),
          img_shape=torch.rand(4),
      )
  
      det_data_sample = DetDataSample(metainfo=meta_info)
      assert "img_size" in det_data_sample
      assert det_data_sample.img_size == [256, 256]
      assert det_data_sample.get("img_size") == [256, 256]
  
file_path: mmdetection/tests/test_structures/test_det_data_sample.py
imports: from unittest import TestCase
  import numpy
  import pytest
  import torch
  from mmengine.structures import InstanceData, PixelData
  from mmdet.structures import DetDataSample
label_desc: Use image node_id 1 for calling the TestDetDataSample obj's underlying member method code with example usage: obj.test_init() without return types