code: def _type_promotion_lattice():
      """
      Return the type promotion lattice in the form of a DAG.
      This DAG maps each type to its immediately higher type on the lattice.
      """
      (b1,) = BOOL_TYPES
      (u1, u2, u4, u8, i1, i2, i4, i8) = INT_TYPES
      bf, f2, f4, f8 = FLOAT_TYPES
      i_, f_ = WEAK_TYPES
      out = {
          b1: [i_],
          u1: [i2, u2],
          u2: [i4, u4],
          u4: [i8, u8],
          u8: [f_],
          i_: [u1, i1],
          i1: [i2],
          i2: [i4],
          i4: [i8],
          i8: [f_],
          f_: [bf, f2],
          bf: [f4],
          f2: [f4],
          f4: [f8],
          f8: [],
      }
      return out
  
file_path: keras/keras/backend/common/dtypes.py
imports: import functools
  from keras import backend
  from keras.api_export import keras_export
  from keras.backend.common.variables import ALLOWED_DTYPES
  from keras.backend.common.variables import standardize_dtype
label_desc: Use image node_id 1 for calling a global function with example usage: _type_promotion_lattice() and returns: out