code: def update_listtype(l_type, length, elem_shape, dtype):
      """
      Update in-place of l_type (ListType) to length and type.
      """
  
      elem_type = create_valuetype_tensor(elem_shape, dtype)
      l_type.type.CopyFrom(elem_type)
  
      l_dim = l_type.length
      set_proto_dim(l_dim, length)
  
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 2 for calling a global function with example usage: update_listtype(l_type, length, elem_shape, dtype) without return types