code: def is_subtype_tensor(type1, type2):
      # requires primitive types match
      if type1.get_primitive() != type2.get_primitive():
          return False
  
      shape1 = type1.get_shape()
      shape2 = type2.get_shape()
      # Same rank
      if len(shape1) != len(shape2):
          return False
  
      for d1, d2 in zip(shape1, shape2):
          if d1 == d2:
              continue
  
          # tensor with shape (3, s0) is not a subtype of tensor with shape (3,
          # 1), but is a subtype of tensor with shape (3, s1)
          d1_is_symbolic = issubclass(type(d1), sm.Basic)
          d2_is_symbolic = issubclass(type(d2), sm.Basic)
          if d1_is_symbolic and d2_is_symbolic:
              continue
          if d1_is_symbolic and not d2_is_symbolic:
              return False
          if not d1_is_symbolic and not d2_is_symbolic and d1 != d2:
              return False
      return True
  
imports: from .type_bool import bool
  from .type_double import is_float, fp16, fp32, fp64
  from .type_list import is_list
  from .type_int import is_int, int8, int16, int32, int64, uint8, uint16, uint32, uint64
  from .type_str import str
  from .type_unknown import unknown
  import numpy
  import sympy
  import six
  from .get_type_info import get_type_info
label_desc: Use image node_id 15 for calling a global function with example usage: is_subtype_tensor(type1, type2) and returns: True, False, False, False, False