code: def testBinaryNonPromotion(self, dtype, weak_type, promotion):
      if dtype in fp8_dtypes:
          self.skipTest("XLA support for float8 is incomplete.")
      if dtype in int4_dtypes:
          self.skipTest("XLA support for int4 is incomplete.")
      # Regression test for https://github.com/google/jax/issues/6051
      x = lax_internal._convert_element_type(
          0, dtype, weak_type=weak_type
      )
      with jax.numpy_dtype_promotion(promotion):
          y = x + x
  
      if (
          promotion == "standard"
          or not weak_type
          or dtype == dtypes.bool_
      ):
          expected_dtype = dtype
      elif dtypes.issubdtype(dtype, np.complexfloating):
          expected_dtype = np.complex128
      elif dtypes.issubdtype(dtype, np.floating):
          expected_dtype = np.float64
      else:
          expected_dtype = np.int64
  
      # No boolean weak types.
      expected_weak_type = weak_type and dtype != bool
      expected_dtype = dtypes.canonicalize_dtype(expected_dtype)
  
      self.assertEqual(y.dtype, expected_dtype)
      self.assertEqual(dtypes.is_weakly_typed(y), expected_weak_type)
  
imports: import dataclasses
  import enum
  import functools
  from functools import partial
  import itertools
  import operator
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import jax
  from jax import numpy
  from jax._src import config
  from jax._src import dtypes
  from jax._src import test_util
  from jax._src.lax import lax
label_desc: Use image node_id 12 for calling the TestPromotionTables obj's underlying member method code with example usage: obj.testBinaryNonPromotion(dtype, weak_type, promotion) without return types