code: def test_log_prob():
      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, 2.0], [-1.0, 1.0], [2.0, 1.0], [2.0, 2.0], [4.0, 6.0]]
      )
      x = torch.tensor([2.0, 3.0, 4.0, 1.0, 7.0])
      cov = D.diag() + W.matmul(W.t())
  
      mvn = MultivariateNormal(loc, cov)
      lowrank_mvn = LowRankMultivariateNormal(loc, W, D)
  
      assert_equal(mvn.log_prob(x), lowrank_mvn.log_prob(x))
  
imports: import torch
  from pyro.distributions import LowRankMultivariateNormal, MultivariateNormal
  from tests.common import assert_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_log_prob() without return types