code: def test_backend_dispatch(backend):
      def model():
          pyro.sample("x", dist.Normal(0, 1))
  
      guide = AutoGaussian(model, backend=backend)
      if backend == "dense":
          assert isinstance(guide, AutoGaussianDense)
          guide = AutoGaussianDense(model)
          assert isinstance(guide, AutoGaussianDense)
      elif backend == "funsor":
          assert isinstance(guide, AutoGaussianFunsor)
          guide = AutoGaussianFunsor(model)
          assert isinstance(guide, AutoGaussianFunsor)
      else:
          raise ValueError(f"Unknown backend: {backend}")
  
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 2 for calling a global function with example usage: test_backend_dispatch(backend) without return types