code: def _assertIntegral(self, sample_vals, pdf_vals, err=1.5e-3):
      s_p = zip(sample_vals, pdf_vals)
      prev = (sample_vals.min(), 0)
      total = 0
      for k in sorted(s_p, key=lambda x: x[0]):
          pair_pdf = (k[1] + prev[1]) / 2
          total += (k[0] - prev[0]) * pair_pdf
          prev = k
      self.assertNear(1.0, total, err=err)
  
imports: import math
  import numpy
  from scipy import stats
  from scipy.special import gamma
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import half_student_t
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 22 for calling the HalfStudentTTest obj's underlying member method code with example usage: obj._assertIntegral(sample_vals, pdf_vals, err) without return types