code: def test_one_stage_wrapper(self):
      packed_inputs = demo_mm_inputs(
          2, [[3, 128, 128], [3, 128, 128]], num_classes=2
      )
      # Test forward train
      data = self.FCOS.data_preprocessor(packed_inputs, True)
      bi, ds = data["inputs"], data["data_samples"]
      losses = self.FCOS.forward(bi, ds, mode="loss")
      self.assertIsInstance(losses, dict)
      # Test forward test
      self.FCOS.eval()
      ds = [
          TextDetDataSample(metainfo=d.metainfo, **dict(d.items()))
          for d in ds
      ]
      with torch.no_grad():
          batch_results = self.FCOS.forward(bi, ds, mode="predict")
          self.assertEqual(len(batch_results), 2)
          self.assertIsInstance(batch_results[0], TextDetDataSample)
  
file_path: mmocr/tests/test_models/test_textdet/test_wrappers/test_mmdet_wrapper.py
imports: import unittest
  import torch
  from mmdet.structures import DetDataSample
  from mmdet.testing import demo_mm_inputs
  from mmengine.config import Config
  from mmengine.registry import init_default_scope
  from mmengine.structures import InstanceData
  from mmocr.registry import MODELS
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 2 for calling the TestMMDetWrapper obj's underlying member method code with example usage: obj.test_one_stage_wrapper() without return types