code: def test_optimizer(backend, optim_name, jit):
      def model(data):
          p = pyro.param("p", torch.tensor(0.5))
          pyro.sample("x", dist.Bernoulli(p), obs=data)
  
      def guide(data):
          pass
  
      data = torch.tensor(0.0)
      with pyro_backend(backend):
          pyro.get_param_store().clear()
          Elbo = infer.JitTrace_ELBO if jit else infer.Trace_ELBO
          elbo = Elbo(ignore_jit_warnings=True)
          optimizer = getattr(optim, optim_name)({"lr": 1e-6})
          inference = infer.SVI(model, guide, optimizer, elbo)
          for i in range(2):
              inference.step(data)
  
imports: import warnings
  import pytest
  import funsor
  from funsor.testing import xfail_param
  from funsor.util import get_backend
label_desc: Use image node_id 10 for calling a global function with example usage: test_optimizer(backend, optim_name, jit) without return types