code: def __init__(
      self,
      name=None,
      shape=None,
      dtype=None,
      is_optional=False,
      optional_value=None,
  ):
      super(TensorType, self).__init__(name, shape)
      if dtype is None:
          self.dtype = types.fp32
      elif is_builtin(dtype):
          self.dtype = dtype
      else:
          # Assume dtype is numpy type
          try:
              self.dtype = numpy_type_to_builtin_type(dtype)
          except TypeError:
              raise TypeError("dtype={} is unsupported".format(dtype))
  
      # optional input values
      self.is_optional = is_optional
      self.optional_value = optional_value
  
imports: import logging
  import numpy
  import six
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types.type_mapping import numpy_type_to_builtin_type, is_builtin
label_desc: Use image node_id 1 to create a new TensorType object from inherited base classes: InputType with example: obj = TensorType(name, shape, dtype, is_optional, optional_value)