code: def testMixtureTargetLogProb(self, make_kernel_fn, optimal_accept):
      if tf.executing_eagerly():
          self.skipTest(
              "Skipping eager-mode test to reduce test weight."
          )
  
      seed = test_util.test_seed()
      # Generate a 2 component Gaussian Mixture in 3 dimension
      nd = 3
      w = 0.1
      mixture_weight = tf.constant([w, 1.0 - w], tf.float64)
      mu = np.ones(nd) * 0.5
      component_loc = tf.cast(np.asarray([mu, -mu]), tf.float64)
      scale_diag = tf.tile(
          tf.constant([[0.1], [0.2]], dtype=tf.float64), [1, nd]
      )
  
      proposal = sample.Sample(
          normal.Normal(tf.constant(0.0, tf.float64), 10.0),
          sample_shape=nd,
      )
      init_state = proposal.sample(5000, seed=seed)
  
      likelihood_dist = mixture_same_family.MixtureSameFamily(
          mixture_distribution=categorical.Categorical(
              probs=mixture_weight
          ),
          components_distribution=mvn_diag.MultivariateNormalDiag(
              loc=component_loc, scale_diag=scale_diag
          ),
      )
  
      # Uniform prior
      init_log_prob = tf.zeros_like(proposal.log_prob(init_state))
  
      [n_stage, final_state, _] = sample_sequential_monte_carlo(
          lambda x: init_log_prob,
          likelihood_dist.log_prob,
          init_state,
          make_kernel_fn=make_kernel_fn,
          tuning_fn=functools.partial(
              simple_heuristic_tuning, optimal_accept=optimal_accept
          ),
          max_num_steps=50,
          seed=seed,
      )
  
      assert_cdf_equal_sample = (
          st.assert_true_cdf_equal_by_dkwm_two_sample(
              final_state, likelihood_dist.sample(5000, seed=seed), 1e-5
          )
      )
  
      n_stage, _ = self.evaluate((n_stage, assert_cdf_equal_sample))
      self.assertLess(n_stage, 15)
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import half_normal
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import mixture
  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.distributions import sample
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.experimental.mcmc.sample_sequential_monte_carlo import compute_hmc_step_size
  from tensorflow_probability.python.experimental.mcmc.sample_sequential_monte_carlo import gen_make_hmc_kernel_fn
  from tensorflow_probability.python.experimental.mcmc.sample_sequential_monte_carlo import gen_make_transform_hmc_kernel_fn
  from tensorflow_probability.python.experimental.mcmc.sample_sequential_monte_carlo import make_rwmh_kernel_fn
  from tensorflow_probability.python.experimental.mcmc.sample_sequential_monte_carlo import sample_sequential_monte_carlo
  from tensorflow_probability.python.experimental.mcmc.sample_sequential_monte_carlo import simple_heuristic_tuning
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc import nuts
label_desc: Use image node_id 2 for calling the SampleSequentialMonteCarloTest obj's underlying member method code with example usage: obj.testMixtureTargetLogProb(make_kernel_fn, optimal_accept) without return types