code: def test_pyrocov_structure():
      from funsor import Bint, Real, Reals
  
      T, P, S, F = 2, 3, 4, 5
      dataset = {
          "features": torch.randn(S, F),
          "local_time": torch.randn(T, P),
          "weekly_strains": torch.randn(T, P, S).exp().round(),
      }
  
      guide = PoissonGuide(pyrocov_model_poisson, backend="funsor")
      guide(dataset)  # initialize
      guide = guide[0]  # pull out AutoGaussian part of PoissonGuide
  
      expected_plates = frozenset(["place", "strain"])
      assert guide._funsor_plates == expected_plates
  
      expected_eliminate = frozenset(
          [
              "coef",
              "coef_scale",
              "init",
              "init_loc",
              "init_loc_scale",
              "init_scale",
              "place",
              "rate",
              "rate_loc",
              "rate_loc_scale",
              "rate_scale",
              "strain",
          ]
      )
      assert guide._funsor_eliminate == expected_eliminate
  
      expected_factor_inputs = {
          "coef_scale": OrderedDict([("coef_scale", Real)]),
          "rate_loc_scale": OrderedDict([("rate_loc_scale", Real)]),
          "rate_scale": OrderedDict([("rate_scale", Real)]),
          "init_loc_scale": OrderedDict([("init_loc_scale", Real)]),
          "init_scale": OrderedDict([("init_scale", Real)]),
          "coef": OrderedDict(
              [("coef", Reals[5]), ("coef_scale", Real)]
          ),
          "rate_loc": OrderedDict(
              [
                  ("strain", Bint[4]),
                  ("rate_loc", Real),
                  ("rate_loc_scale", Real),
                  ("coef", Reals[5]),
              ]
          ),
          "init_loc": OrderedDict(
              [
                  ("strain", Bint[4]),
                  ("init_loc", Real),
                  ("init_loc_scale", Real),
              ]
          ),
          "rate": OrderedDict(
              [
                  ("place", Bint[3]),
                  ("strain", Bint[4]),
                  ("rate", Real),
                  ("rate_scale", Real),
                  ("rate_loc", Real),
              ]
          ),
          "init": OrderedDict(
              [
                  ("place", Bint[3]),
                  ("strain", Bint[4]),
                  ("init", Real),
                  ("init_scale", Real),
                  ("init_loc", Real),
              ]
          ),
          "obs": OrderedDict(
              [
                  ("place", Bint[3]),
                  ("strain", Bint[4]),
                  ("rate", Real),
                  ("init", Real),
              ]
          ),
      }
      assert guide._funsor_factor_inputs == expected_factor_inputs
  
imports: from collections import OrderedDict, namedtuple
  import pytest
  import torch
  import pyro
  import pyro.distributions
  import pyro.poutine
  from pyro.infer import SVI, JitTrace_ELBO, Predictive, Trace_ELBO
  from pyro.infer.autoguide import AutoGaussian, AutoGuideList
  from pyro.infer.autoguide.gaussian import AutoGaussianDense, AutoGaussianFunsor, _break_plates
  from pyro.infer.reparam import LocScaleReparam
  from pyro.optim import ClippedAdam
  from tests.common import assert_close, assert_equal, xfail_if_not_implemented
label_desc: Use image node_id 22 for calling a global function with example usage: test_pyrocov_structure() without return types