code: def preprocess_example_input(input_config):
      """Prepare an example input image for ``generate_inputs_and_wrap_model``.
  
      Args:
          input_config (dict): customized config describing the example input.
  
      Returns:
          tuple: (one_img, one_meta), tensor of the example input image and \
              meta information for the example input image.
  
      Examples:
          >>> from mmdet.core.export import preprocess_example_input
          >>> input_config = {
          >>>         'input_shape': (1,3,224,224),
          >>>         'input_path': 'demo/demo.jpg',
          >>>         'normalize_cfg': {
          >>>             'mean': (123.675, 116.28, 103.53),
          >>>             'std': (58.395, 57.12, 57.375)
          >>>             }
          >>>         }
          >>> one_img, one_meta = preprocess_example_input(input_config)
          >>> print(one_img.shape)
          torch.Size([1, 3, 224, 224])
          >>> print(one_meta)
          {'img_shape': (224, 224, 3),
          'ori_shape': (224, 224, 3),
          'pad_shape': (224, 224, 3),
          'filename': '<demo>.png',
          'scale_factor': 1.0,
          'flip': False}
      """
      input_path = input_config["input_path"]
      input_shape = input_config["input_shape"]
      one_img = mmcv.imread(input_path)
      one_img = mmcv.imresize(one_img, input_shape[2:][::-1])
      show_img = one_img.copy()
      if "normalize_cfg" in input_config.keys():
          normalize_cfg = input_config["normalize_cfg"]
          mean = np.array(normalize_cfg["mean"], dtype=np.float32)
          std = np.array(normalize_cfg["std"], dtype=np.float32)
          one_img = mmcv.imnormalize(one_img, mean, std)
      one_img = one_img.transpose(2, 0, 1)
      one_img = (
          torch.from_numpy(one_img)
          .unsqueeze(0)
          .float()
          .requires_grad_(True)
      )
      (_, C, H, W) = input_shape
      one_meta = {
          "img_shape": (H, W, C),
          "ori_shape": (H, W, C),
          "pad_shape": (H, W, C),
          "filename": "<demo>.png",
          "scale_factor": 1.0,
          "flip": False,
          "show_img": show_img,
      }
  
      return one_img, one_meta
  
file_path: insightface/detection/scrfd/mmdet/core/export/pytorch2onnx.py
imports: from functools import partial
  import mmcv
  import numpy
  import torch
  from mmcv.runner import load_checkpoint
label_desc: Use image node_id 3 for calling a global function with example usage: preprocess_example_input(input_config) and returns: one_img,  one_meta