code: def testWarnings(self):
      current_state_ = [self.dtype([1, 2]), self.dtype([3, 4])]
      current_state = [tf.convert_to_tensor(s) for s in current_state_]
      # Verify the warning about lacking a log-acceptance correction field.
      expected_inner_init_kernel_results = (
          InnerKernelResultsWithoutCorrection(
              target_log_prob=self.dtype([100.0, -100.0]),
              grads_target_log_prob=[
                  self.dtype([1.25, 1.5]),
                  self.dtype([2.25, 2.5]),
              ],
              extraneous=self.dtype([1.75, 2.0]),
          )
      )
  
      one_step_fn = make_one_step_fn(dtype=self.dtype)
      bootstrap_fn = make_bootstrap_results_fn(
          expected_inner_init_kernel_results
      )
  
      with warnings.catch_warnings(record=True) as w:
          mh = metropolis_hastings.MetropolisHastings(
              FakeTransitionKernel(
                  is_calibrated=True,  # Verify the already-calibrated warning.
                  one_step_fn=one_step_fn,
                  bootstrap_fn=bootstrap_fn,
              )
          )
          init_kernel_results = mh.bootstrap_results(current_state)
          _, _ = mh.one_step(
              current_state,
              init_kernel_results,
              seed=test_util.test_seed(),
          )
      w = sorted(w, key=lambda w: str(w.message))
      self.assertRegexpMatches(
          str(w[0].message), r"`TransitionKernel` is already calibrated"
      )
      self.assertRegexpMatches(
          str(w[1].message),
          r"`TransitionKernel` does not have a `log_acceptance_correction`",
      )
  
imports: import collections
  import warnings
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc import kernel
  from tensorflow_probability.python.mcmc import metropolis_hastings
  from tensorflow_probability.python.mcmc.internal.util import is_list_like
label_desc: Use image node_id 5 for calling the MetropolisHastingsTest obj's underlying member method code with example usage: obj.testWarnings() without return types