code: def test_transform(self):
      loader = InferencerLoader()
  
      # load from path
      img_path = "tests/data/det_toy_dataset/imgs/test/img_1.jpg"
      res = loader(img_path)
      self.assertIsInstance(res["img"], np.ndarray)
  
      # load from ndarray
      img = mmcv.imread(img_path)
      res = loader(img)
      self.assertIsInstance(res["img"], np.ndarray)
  
      # load from dict
      res = loader(dict(img=img))
      self.assertIsInstance(res["img"], np.ndarray)
  
      # invalid input
      with self.assertRaises(NotImplementedError):
          loader(["hello"])
  
imports: import copy
  import os.path
  from unittest import TestCase
  import mmcv
  import numpy
  from mmocr.datasets.transforms import InferencerLoader, LoadImageFromFile, LoadKIEAnnotations, LoadOCRAnnotations
label_desc: Use image node_id 1 for calling the TestInferencerLoader obj's underlying member method code with example usage: obj.test_transform() without return types