code: def testInvalidInverseTemperaturesRaises(self):
      def make_kernel_fn(target_log_prob_fn):
          return random_walk_metropolis.RandomWalkMetropolis(
              target_log_prob_fn=target_log_prob_fn,
              new_state_fn=random_walk_metropolis.random_walk_normal_fn(
                  scale=0.1
              ),
          )
  
      with self.subTest(
          "Nothing raised if valid (even with validate_args)"
      ):
          replica_exchange_mc.ReplicaExchangeMC(
              target_log_prob_fn=None,
              untempered_log_prob_fn=lambda x: 1.0,  # provided
              tempered_log_prob_fn=lambda x: 1.0,  # provided
              inverse_temperatures=[1.0, 0.5],
              make_kernel_fn=make_kernel_fn,
              validate_args=True,
          )
  
      with self.subTest("Negative temperatures not allowed"):
          with self.assertRaisesError("must be non-negative"):
              replica_exchange_mc.ReplicaExchangeMC(
                  target_log_prob_fn=None,
                  untempered_log_prob_fn=lambda x: 1.0,  # provided
                  tempered_log_prob_fn=lambda x: 1.0,  # provided
                  inverse_temperatures=[-1.0, -0.5],
                  make_kernel_fn=make_kernel_fn,
                  validate_args=True,
              )
  
      with self.subTest(
          "Zero temperatures not allowed without split tempering"
      ):
          with self.assertRaisesError("must be positive"):
              replica_exchange_mc.ReplicaExchangeMC(
                  target_log_prob_fn=lambda x: 1.0,  # provided
                  untempered_log_prob_fn=None,
                  tempered_log_prob_fn=None,
                  inverse_temperatures=[1.0, 0.5, 0.0],
                  make_kernel_fn=make_kernel_fn,
                  validate_args=True,
              )
  
imports: from absl import logging
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_combinations
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import unnest
  from tensorflow_probability.python.mcmc import diagnostic
  from tensorflow_probability.python.mcmc import hmc
  from tensorflow_probability.python.mcmc import random_walk_metropolis
  from tensorflow_probability.python.mcmc import replica_exchange_mc
  from tensorflow_probability.python.mcmc import sample
  from tensorflow_probability.python.mcmc import simple_step_size_adaptation
  from tensorflow_probability.python.stats import sample_stats
label_desc: Use image node_id 13 for calling the REMCTest obj's underlying member method code with example usage: obj.testInvalidInverseTemperaturesRaises() and returns: random_walk_metropolis