code: def testBroadcastingPdfArgs(self):
      def _assert_shape(half_student, arg, shape):
          self.assertEqual(half_student.log_prob(arg).shape, shape)
          self.assertEqual(half_student.prob(arg).shape, shape)
  
      def _check(half_student):
          _assert_shape(half_student, 5.0, (3,))
          xs = np.array([5.0, 6.0, 7.0], dtype=np.float32)
          _assert_shape(half_student, xs, (3,))
          xs = np.array([xs])
          _assert_shape(half_student, xs, (1, 3))
          xs = xs.T
          _assert_shape(half_student, xs, (3, 3))
  
      _check(
          half_student_t.HalfStudentT(
              df=[
                  2.0,
                  3.0,
                  4.0,
              ],
              loc=2.0,
              scale=1.0,
              validate_args=True,
          )
      )
      _check(
          half_student_t.HalfStudentT(
              df=7.0,
              loc=[
                  2.0,
                  3.0,
                  4.0,
              ],
              scale=1.0,
              validate_args=True,
          )
      )
      _check(
          half_student_t.HalfStudentT(
              df=7.0,
              loc=3.0,
              scale=[
                  2.0,
                  3.0,
                  4.0,
              ],
              validate_args=True,
          )
      )
  
      def _check2d(half_student):
          _assert_shape(half_student, 5.0, (1, 3))
          xs = np.array([5.0, 6.0, 7.0], dtype=np.float32)
          _assert_shape(half_student, xs, (1, 3))
          xs = np.array([xs])
          _assert_shape(half_student, xs, (1, 3))
          xs = xs.T
          _assert_shape(half_student, xs, (3, 3))
  
      _check2d(
          half_student_t.HalfStudentT(
              df=[
                  [
                      2.0,
                      3.0,
                      4.0,
                  ]
              ],
              loc=2.0,
              scale=1.0,
              validate_args=True,
          )
      )
      _check2d(
          half_student_t.HalfStudentT(
              df=7.0,
              loc=[
                  [
                      2.0,
                      3.0,
                      4.0,
                  ]
              ],
              scale=1.0,
              validate_args=True,
          )
      )
      _check2d(
          half_student_t.HalfStudentT(
              df=7.0,
              loc=3.0,
              scale=[
                  [
                      2.0,
                      3.0,
                      4.0,
                  ]
              ],
              validate_args=True,
          )
      )
  
      def _check2d_rows(half_student):
          _assert_shape(half_student, 5.0, (3, 1))
          xs = np.array([5.0, 6.0, 7.0], dtype=np.float32)  # (3,)
          _assert_shape(half_student, xs, (3, 3))
          xs = np.array([xs])  # (1,3)
          _assert_shape(half_student, xs, (3, 3))
          xs = xs.T  # (3,1)
          _assert_shape(half_student, xs, (3, 1))
  
      _check2d_rows(
          half_student_t.HalfStudentT(
              df=[[2.0], [3.0], [4.0]],
              loc=2.0,
              scale=1.0,
              validate_args=True,
          )
      )
      _check2d_rows(
          half_student_t.HalfStudentT(
              df=7.0,
              loc=[[2.0], [3.0], [4.0]],
              scale=1.0,
              validate_args=True,
          )
      )
      _check2d_rows(
          half_student_t.HalfStudentT(
              df=7.0,
              loc=3.0,
              scale=[[2.0], [3.0], [4.0]],
              validate_args=True,
          )
      )
  
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 11 for calling the HalfStudentTTest obj's underlying member method code with example usage: obj.testBroadcastingPdfArgs() without return types