code: def test_funsor_to_mvn(batch_shape, event_shape, real_size):
      expected = random_mvn(batch_shape + event_shape, real_size)
      event_dims = tuple("abc"[: len(event_shape)])
      ndims = len(expected.batch_shape)
  
      funsor_ = dist_to_funsor(expected, event_dims)(value="value")
      assert isinstance(funsor_, Funsor)
  
      actual = funsor_to_mvn(funsor_, ndims, event_dims)
      assert isinstance(actual, dist.MultivariateNormal)
      assert actual.batch_shape == expected.batch_shape
      assert_close(actual.loc, expected.loc, atol=1e-3, rtol=None)
      assert_close(
          actual.precision_matrix,
          expected.precision_matrix,
          atol=1e-3,
          rtol=None,
      )
  
imports: from collections import OrderedDict
  import pyro.distributions
  import pytest
  import torch
  from pyro.distributions.torch_distribution import MaskedDistribution
  from funsor.domains import Bint, Reals
  from funsor.pyro.convert import dist_to_funsor, funsor_to_cat_and_mvn, funsor_to_mvn, funsor_to_tensor, matrix_and_mvn_to_funsor, mvn_to_funsor, tensor_to_funsor
  from funsor.tensor import Tensor
  from funsor.terms import Funsor
  from funsor.testing import assert_close, random_mvn
label_desc: Use image node_id 5 for calling a global function with example usage: test_funsor_to_mvn(batch_shape, event_shape, real_size) without return types