code: def test_log_prob(mvn_dist):
      loc = torch.tensor([2.0, 1.0, 1.0, 2.0, 2.0])
      D = torch.tensor([1.0, 2.0, 3.0, 1.0, 3.0])
      W = torch.tensor(
          [[1.0, -1.0, 2.0, 2.0, 4.0], [2.0, 1.0, 1.0, 2.0, 6.0]]
      )
      x = torch.tensor([2.0, 3.0, 4.0, 1.0, 7.0])
      L = D.diag() + torch.tril(W.t().matmul(W))
      cov = torch.mm(L, L.t())
  
      mvn = MultivariateNormal(loc, cov)
      if mvn_dist == OMTMultivariateNormal:
          mvn_prime = OMTMultivariateNormal(loc, L)
      elif mvn_dist == AVFMultivariateNormal:
          CV = 0.2 * torch.rand(2, 2, 5)
          mvn_prime = AVFMultivariateNormal(loc, L, CV)
      assert_equal(mvn.log_prob(x), mvn_prime.log_prob(x))
  
file_path: pyro/tests/distributions/test_omt_mvn.py
imports: import numpy
  import pytest
  import torch
  from pyro.distributions import AVFMultivariateNormal, MultivariateNormal, OMTMultivariateNormal
  from tests.common import assert_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_log_prob(mvn_dist) without return types