code: def testMeanAllowNanStatsIsTrueReturnsNaNForUndefinedBatchMembers(
      self,
  ):
      loc = [-2, 0.0, 1.0, 3.3, 4.4]
      sigma = [5.0, 4.0, 3.0, 2.0, 1.0]
      half_student = half_student_t.HalfStudentT(
          df=[0.5, 1.0, 3.0, 5.0, 7.0],
          loc=loc,
          scale=sigma,
          allow_nan_stats=True,
          validate_args=True,
      )
      mean = self.evaluate(half_student.mean())
  
      # confirm two NaNs, where they are expected
      self.assertEqual(np.isnan(mean).sum(), 2)
      self.assertAllNan(mean[:2])
  
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 14 for calling the HalfStudentTTest obj's underlying member method code with example usage: obj.testMeanAllowNanStatsIsTrueReturnsNaNForUndefinedBatchMembers() without return types