code: def test_deterministic_given_seed(self, use_xla):
      design_matrix, _, targets = self.evaluate(
          self._random_regression_task(
              num_outputs=3,
              num_features=4,
              batch_shape=[],
              seed=test_util.test_seed(),
          )
      )
  
      sampler = spike_and_slab.SpikeSlabSampler(design_matrix)
  
      initial_nonzeros = tf.convert_to_tensor(
          [True, False, False, True]
      )
      seed = test_util.test_seed(sampler_type="stateless")
  
      @tf.function(jit_compile=use_xla)
      def do_sample(seed):
          return sampler.sample_noise_variance_and_weights(
              targets, initial_nonzeros, seed=seed
          )
  
      variance1, weights1 = self.evaluate(do_sample(seed))
      variance2, weights2 = self.evaluate(do_sample(seed))
      self.assertAllFinite(variance1)
      self.assertAllClose(variance1, variance2)
      self.assertAllFinite(weights1)
      self.assertAllClose(weights1, weights2)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.distributions import normal_conjugate_posteriors
  from tensorflow_probability.python.experimental.sts_gibbs import spike_and_slab
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc.internal import util
label_desc: Use image node_id 10 for calling the SpikeAndSlabTest obj's underlying member method code with example usage: obj.test_deterministic_given_seed(use_xla) and returns: sampler