code: def test_kl_delta_mvn_shape(batch_shape, size):
      v = torch.randn(batch_shape + (size,))
      p = dist.Delta(v, event_dim=1)
  
      loc = torch.randn(batch_shape + (size,))
      cov = torch.randn(batch_shape + (size, size))
      cov = cov @ cov.transpose(-1, -2) + 0.01 * torch.eye(size)
      q = dist.MultivariateNormal(loc, covariance_matrix=cov)
      assert kl_divergence(p, q).shape == batch_shape
  
file_path: pyro/tests/distributions/test_kl.py
imports: import pytest
  import torch
  from torch.distributions import kl_divergence, transforms
  import pyro.distributions
  from pyro.distributions.util import sum_rightmost
  from tests.common import assert_close
label_desc: Use image node_id 2 for calling a global function with example usage: test_kl_delta_mvn_shape(batch_shape, size) without return types