code: def promote_types(dtype1, dtype2):
      """
      Get the smallest type to which the given scalar types can be cast.
  
      Args:
          dtype1 (builtin):
          dtype2 (builtin):
  
      Returns:
          A builtin datatype or None.
      """
      nptype1 = nptype_from_builtin(dtype1)
      nptype2 = nptype_from_builtin(dtype2)
      # Circumvent the undesirable np type promotion:
      # >> np.promote_types(np.float32, np.int)
      # dtype('float64')
      if np.issubdtype(nptype1, np.floating) and np.issubdtype(
          nptype2, np.signedinteger
      ):
          nppromoted = nptype1
      elif np.issubdtype(nptype2, np.floating) and np.issubdtype(
          nptype1, np.signedinteger
      ):
          nppromoted = nptype2
      else:
          nppromoted = np.promote_types(nptype1, nptype2)
      return numpy_type_to_builtin_type(nppromoted)
  
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 5 for calling a global function with example usage: promote_types(dtype1, dtype2) and returns: numpy_type_to_builtin_type