code: def list(arg, init_length=None, dynamic_length=True):
      class list:
          T = [arg, init_length, dynamic_length]
  
          def __init__(self):
              self.val = []
  
          @classmethod
          def __type_info__(cls):
              return Type(
                  "list", [get_type_info(arg)], python_class=cls
              )
  
          @annotate(void, other=T[0])
          def append(self, other):
              assert isinstance(other, self.T[0])
              self.val.append(other)
  
          @annotate(T[0], index=type_int.int)
          def __getitem__(self, index):
              assert isinstance(index, type_int.int)
              return self.val[index.val]
  
          @annotate(void, index=type_int.int, newval=T[0])
          def __setitem__(self, index, newval):
              assert isinstance(index, type_int.int)
              assert isinstance(newval, self.T[0])
              self.val[index.val] = newval
  
          @annotate(type_int.int)
          def __len__(self):
              return (
                  type_int.int(len(self.val))
                  if self.T[1] is None
                  else self.T[1]
              )
  
      list.__template_name__ = "list[" + arg.__name__ + "]"
      return list
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/mil/types/type_list.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from .annotate import annotate
  from .type_void import void
  from .None import type_int
  from .type_spec import Type
  from .get_type_info import get_type_info
label_desc: Use image node_id 2 for calling a global function with example usage: list(arg, init_length, dynamic_length) and returns: list, Type, self, unknown