code: def create_tensor(
      tensor_list, tensor_name, initializer, dtype="int64"
  ):
      """Helper function to create a tensor value node and a
      initializer tensor node with constant value."""
      tensor_np = np.array(tensor_list, dtype=dtype)
      data_type = onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[tensor_np.dtype]
      dims = np.shape(tensor_np)
      if dtype == np.float16:
          tensor_np = tensor_np.view(dtype=np.uint16)
      tensor = onnx.helper.make_tensor(
          name=tensor_name,
          data_type=data_type,
          dims=dims,
          vals=tensor_np.flatten().tolist(),
          raw=False,
      )
      initializer.append(tensor)
  
imports: import re
  import logging
  import numpy
  from .._export_onnx import MXNetGraph
label_desc: Use image node_id 10 for calling a global function with example usage: create_tensor(tensor_list, tensor_name, initializer, dtype) without return types