code: def create_immediate_value(var):
      if types.is_tensor(var.sym_type):
          return create_tensor_value(var.val)
      elif types.is_list(var.sym_type):
          if var.elem_type == types.str:
              return create_list_scalarvalue(var.val, str)
          elif var.elem_type == types.int64:
              return create_list_scalarvalue(var.val, np.int64)
          else:
              raise NotImplementedError(
                  "List element type, {}, not supported yet.".format(
                      var.sym_type.__type_info__()
                  )
              )
      else:
          return create_scalar_value(var.val)
  
imports: import os
  import numpy
  import coremltools.proto.FeatureTypes_pb2
  import coremltools.proto.MIL_pb2
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types import BUILTIN_TO_PROTO_TYPES, builtin_to_string, numpy_type_to_builtin_type, type_to_builtin_type
  from coremltools.converters.mil.mil.types.type_mapping import np_val_to_py_type
  from coremltools.models.utils import _WEIGHTS_DIR_NAME, _WEIGHTS_FILE_NAME
label_desc: Use image node_id 19 for calling a global function with example usage: create_immediate_value(var) and returns: create_tensor_value, create_scalar_value, create_list_scalarvalue, create_list_scalarvalue