code: def unwrapper(model_onnx, index2name, config):
      """
      Fill onnx config and remove wrapper node in onnx
  
      Parameters
      ----------
      model_onnx : onnx model
          Onnx model which is converted from pytorch model
      index2name : dict
          Dictionary of layer index and name
      config : dict
          Config recording name of layers and calibration parameters
  
      Returns
      -------
      onnx model
          Onnx model which is converted from pytorch model
      dict
          The configuration of onnx model layers and calibration parameters
      """
      # Support Gemm, Conv, Relu, Clip(Relu6) and Maxpool
      support_op = ["Gemm", "Conv", "Relu", "Clip", "MaxP"]
      idx = 0
      onnx_config = {}
      while idx < len(model_onnx.graph.node):
          nd = model_onnx.graph.node[idx]
          if nd.name[0:4] in support_op and idx > 1:
              # Grad constant node and multiply node
              const_nd = model_onnx.graph.node[idx - 2]
              mul_nd = model_onnx.graph.node[idx - 1]
              # Get index number which is transferred by constant node
              index = int(
                  onnx.numpy_helper.to_array(const_nd.attribute[0].t)
              )
              if index != -1:
                  name = index2name[index]
                  onnx_config[nd.name] = config[name]
              nd.input[0] = mul_nd.input[0]
              # Remove constant node and multiply node
              model_onnx.graph.node.remove(const_nd)
              model_onnx.graph.node.remove(mul_nd)
              idx = idx - 2
          idx = idx + 1
      return model_onnx, onnx_config
  
file_path: nni/nni/compression/quantization_speedup/frontend_to_onnx.py
imports: import torch
  import onnx
  import onnx.numpy_helper
  from ..utils import set_nested_attr
label_desc: Use image node_id 1 for calling a global function with example usage: unwrapper(model_onnx, index2name, config) and returns: model_onnx,  onnx_config