code: def create_const_scalar_node(input_name, value, kwargs):
      """Helper function to create a tensor value node and a
      initializer tensor node with constant value."""
      from onnx.helper import make_tensor
  
      initializer = kwargs["initializer"]
      dtype = value.dtype
      if dtype == "float16":
          # when using float16, we must convert it to np.uint16 view first
          value = np.float16(value).view(np.uint16)
      input_type = onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[dtype]
      tensor_node = make_tensor(input_name, input_type, (), ([value]))
      initializer.append(tensor_node)
  
imports: import re
  import logging
  import numpy
  from .._export_onnx import MXNetGraph
label_desc: Use image node_id 8 for calling a global function with example usage: create_const_scalar_node(input_name, value, kwargs) without return types