code: def is_compatible_type(type1, type2):
      """
      Return if type1 and type2 are compatible.
      """
      if not is_subtype(type1, type2):
          is_comp, _ = is_tensor_and_is_compatible(type1, type2)
          return is_comp
      return True
  
file_path: coremltools/coremltools/converters/mil/mil/types/type_tensor.py
imports: import numpy
  import sympy
  from coremltools import _logger
  from .get_type_info import get_type_info
  from .type_mapping import builtin_to_string, is_subtype, is_tensor, nptype_from_builtin, numpy_type_to_builtin_type, promote_types
  from .type_spec import Type
label_desc: Use image node_id 6 for calling a global function with example usage: is_compatible_type(type1, type2) and returns: True, is_comp