code: def convert_weights_and_inputs(node, **kwargs):
      
      name, _, _ = get_inputs(node, kwargs)
  
      if kwargs["is_input"] is False:
          weights = kwargs["weights"]
          initializer = kwargs["initializer"]
          np_arr = weights[name]
          data_type = onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[np_arr.dtype]
          dims = np.shape(np_arr)
  
          tensor_node = onnx.helper.make_tensor_value_info(name, data_type, dims)
  
          initializer.append(
              onnx.helper.make_tensor(
                  name=name,
                  data_type=data_type,
                  dims=dims,
                  vals=np_arr.flatten().tolist(),
                  raw=False,
              )
          )
  
          return [tensor_node]
      else:
          tval_node = onnx.helper.make_tensor_value_info(name, kwargs["in_type"], kwargs["in_shape"])
          return [tval_node]
docs: Helper function to convert weights and inputs.