code: def test_shape(df_shape, loc_shape, cov_shape, dim):
      mvt = random_mvt(df_shape, loc_shape, cov_shape, dim)
      assert mvt.df.shape == mvt.batch_shape
      assert mvt.loc.shape == mvt.batch_shape + mvt.event_shape
      assert (
          mvt.covariance_matrix.shape
          == mvt.batch_shape + mvt.event_shape * 2
      )
      assert mvt.scale_tril.shape == mvt.covariance_matrix.shape
      assert mvt.precision_matrix.shape == mvt.covariance_matrix.shape
  
      assert_equal(
          mvt.precision_matrix, mvt.covariance_matrix.inverse()
      )
  
      # smoke test for precision/log_prob backward
      (
          mvt.precision_matrix.sum()
          + mvt.log_prob(torch.zeros(dim)).sum()
      ).backward()
  
file_path: pyro/tests/distributions/test_mvt.py
imports: import math
  import pytest
  import torch
  from torch.distributions import Gamma, MultivariateNormal, StudentT
  from pyro.distributions import MultivariateStudentT
  from tests.common import assert_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_shape(df_shape, loc_shape, cov_shape, dim) without return types