code: def test_student_t_expected_improvement_matches_parallel(self):
      shape = [5, 20]
      df = self.dtype(50.0)
      loc = 2.0 * np.random.uniform(size=shape).astype(self.dtype)
      scale = 3.0 + np.random.uniform(size=[20]).astype(self.dtype)
      exploration = 0.0
      observations = np.array([2.0, 3.0, 4.0]).astype(self.dtype)
      best_observed = tf.reduce_max(observations)
      actual_ei = expected_improvement.student_t_expected_improvement(
          df=df,
          best_observed=best_observed,
          mean=loc,
          stddev=scale,
          exploration=exploration,
      )
  
      model = student_t.StudentT(
          df,
          loc[..., tf.newaxis],
          scale[..., tf.newaxis],
          validate_args=True,
      )
      expected_ei = expected_improvement.ParallelExpectedImprovement(
          predictive_distribution=model,
          observations=observations,
          exploration=exploration,
          num_samples=int(2e5),
          seed=test_util.test_seed(),
      )()
  
      self.assertAllClose(
          self.evaluate(actual_ei),
          self.evaluate(expected_ei),
          rtol=1e-1,
      )
      self.assertDTypeEqual(actual_ei, self.dtype)
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import gaussian_process_regression_model
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import student_t
  from tensorflow_probability.python.distributions import student_t_process_regression_model
  from tensorflow_probability.python.experimental.bayesopt.acquisition import expected_improvement
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math.psd_kernels import exponentiated_quadratic
label_desc: Use image node_id 6 for calling the _ExpectedImprovementTest obj's underlying member method code with example usage: obj.test_student_t_expected_improvement_matches_parallel() without return types