code: def testMarkovChainLogprobMatchesOriginal(self):
      # Use a very short dataset since the non-markov-chain model is slow.
      dataset = data.sp500_returns(num_points=10)
      model = stochastic_volatility.StochasticVolatility(
          use_markov_chain=False, **dataset
      )
      markov_chain_model = stochastic_volatility.StochasticVolatility(
          use_markov_chain=True, **dataset
      )
  
      xs = self.evaluate(
          model.prior_distribution().sample(
              10, seed=tfp_test_util.test_seed()
          )
      )
      xs_stacked = xs[:-1] + (tf.stack(xs[-1], axis=-1),)
      self.assertAllClose(
          model.unnormalized_log_prob(xs),
          markov_chain_model.unnormalized_log_prob(xs_stacked),
          atol=1e-2,
      )
  
file_path: probability/spinoffs/inference_gym/inference_gym/targets/stochastic_volatility_test.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from inference_gym.internal import data
  from inference_gym.internal import test_util
  from inference_gym.targets import stochastic_volatility
label_desc: Use image node_id 5 for calling the StochasticVolatilityTest obj's underlying member method code with example usage: obj.testMarkovChainLogprobMatchesOriginal() without return types