code: def testMeanAndVariance(self):
      df, loc, scale_row, scale_col = self._random_df_loc_and_scale(
          batch_shape=[3, 4], matrix_shape=[2, 5]
      )
      matrix_t = mtlo.MatrixTLinearOperator(
          df, loc, scale_row, scale_col
      )
  
      cov_row = scale_row.matmul(scale_row.adjoint())
      cov_col = scale_col.matmul(scale_col.adjoint())
      # Compute diagonal of Kronecker product
      expected_variance = (
          cov_col.to_dense()[..., :, tf.newaxis, :, tf.newaxis]
          * cov_row.to_dense()[..., tf.newaxis, :, tf.newaxis, :]
      )
      expected_variance = tf.linalg.diag_part(
          tf.reshape(expected_variance, [3, 4, 10, 10])
      )
      expected_variance = tf.linalg.matrix_transpose(
          tf.reshape(expected_variance, [3, 4, 5, 2])
      )
      expected_variance = (
          expected_variance
          * (df / (df - 2.0))[..., tf.newaxis, tf.newaxis]
      )
      mean_, loc_, variance_, expected_variance_ = self.evaluate(
          [matrix_t.mean(), loc, matrix_t.variance(), expected_variance]
      )
      self.assertAllClose(loc_, mean_)
      self.assertAllClose(expected_variance_, variance_)
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.bijectors import transform_diagonal
  from tensorflow_probability.python.distributions import matrix_t_linear_operator
  from tensorflow_probability.python.distributions import multivariate_student_t
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 6 for calling the _MatrixTTest obj's underlying member method code with example usage: obj.testMeanAndVariance() without return types