code: def test_gaussian_mrf_log_prob(
      init_shape, trans_shape, obs_shape, hidden_dim, obs_dim
  ):
      init_dist = random_mvn(init_shape, hidden_dim)
      trans_dist = random_mvn(trans_shape, hidden_dim + hidden_dim)
      obs_dist = random_mvn(obs_shape, hidden_dim + obs_dim)
  
      actual_dist = GaussianMRF(init_dist, trans_dist, obs_dist)
      expected_dist = dist.GaussianMRF(init_dist, trans_dist, obs_dist)
      assert actual_dist.event_shape == expected_dist.event_shape
      assert actual_dist.batch_shape == expected_dist.batch_shape
  
      batch_shape = broadcast_shape(
          init_shape + (1,), trans_shape, obs_shape
      )
      data = obs_dist.expand(batch_shape).sample()[..., hidden_dim:]
      actual_log_prob = actual_dist.log_prob(data)
      expected_log_prob = expected_dist.log_prob(data)
      assert_close(
          actual_log_prob, expected_log_prob, atol=1e-4, rtol=1e-4
      )
      check_expand(actual_dist, data)
  
file_path: funsor/test/pyro/test_hmm.py
imports: import pyro.distributions
  import pytest
  import torch
  from funsor.pyro.hmm import DiscreteHMM, GaussianHMM, GaussianMRF, SwitchingLinearHMM
  from funsor.testing import assert_close, random_mvn
  from funsor.util import broadcast_shape
label_desc: Use image node_id 7 for calling a global function with example usage: test_gaussian_mrf_log_prob(init_shape, trans_shape, obs_shape, hidden_dim, obs_dim) without return types