class_docstr: Test the dtype to verify that the behavior matches JAX.
class_docstr_tok: ["Test","the","dtype","to","verify","that","the","behavior","matches","JAX","."]
code: def test_cycle_detection_in_make_lattice_upper_bounds(self):
      original_lattice_function = dtypes._type_promotion_lattice
  
      def mock_lattice():
          lattice = original_lattice_function()
          lattice["int32"].append("float32")
          lattice["float32"].append("int32")
          return lattice
  
      dtypes._type_promotion_lattice = mock_lattice
  
      with self.assertRaisesRegex(
          ValueError,
          "cycle detected in type promotion lattice for node",
      ):
          dtypes._make_lattice_upper_bounds()
  
      dtypes._type_promotion_lattice = original_lattice_function
  
imports: from absl.testing import parameterized
  from keras import backend
  from keras import ops
  from keras.backend.common import dtypes
  from keras.backend.common.variables import ALLOWED_DTYPES
  from keras.testing import test_case
  from keras.testing.test_utils import named_product
label_desc: Use image node_id 15 for calling the DtypesTest obj's underlying member method code with example usage: obj.test_cycle_detection_in_make_lattice_upper_bounds() and returns: lattice