code: def _check_is_compatible_type(type1, type2):
      if not types.is_subtype(type1, type2):
          is_comp, _ = types.is_tensor_and_is_compatible(type1, type2)
          return is_comp
      return True
  
imports: from collections import Counter, OrderedDict
  import copy
  import logging
  import numpy
  from six import string_types
  from .None import SPACES, types
  from .var import Var, InternalVar, ListVar
  from .visitors.dot_visitor import DotVisitor
  from .types.symbolic import k_used_symbols, k_num_internal_syms, any_symbolic, is_symbolic
  from .input_type import TupleInputType
label_desc: Use image node_id 2 for calling a global function with example usage: _check_is_compatible_type(type1, type2) and returns: True, is_comp