code: def test_svi(Elbo, num_particles):
      pyro.clear_param_store()
      data = torch.arange(10.0)
  
      def model(data):
          loc = pyro.param("loc", constant(0.0))
          scale = pyro.param(
              "scale", constant(1.0), constraint=constraints.positive
          )
          pyro.sample(
              "x",
              dist.Normal(loc, scale).expand_by(data.shape).to_event(1),
              obs=data,
          )
  
      def guide(data):
          pass
  
      elbo = Elbo(
          num_particles=num_particles, strict_enumeration_warning=False
      )
      inference = SVI(model, guide, Adam({"lr": 1e-6}), elbo)
      for i in range(100):
          inference.step(data)
  
imports: import logging
  import warnings
  import pytest
  import torch
  from torch.autograd import grad
  from torch.distributions import constraints, kl_divergence
  import pyro
  import pyro.distributions
  import pyro.ops.jit
  import pyro.poutine
  from pyro.distributions.util import scale_and_mask
  from pyro.infer import SVI, JitTrace_ELBO, JitTraceEnum_ELBO, JitTraceGraph_ELBO, JitTraceMeanField_ELBO, Trace_ELBO, TraceEnum_ELBO, TraceGraph_ELBO, TraceMeanField_ELBO, TraceTMC_ELBO, infer_discrete
  from pyro.optim import Adam
  from pyro.poutine.indep_messenger import CondIndepStackFrame
  from pyro.util import ignore_jit_warnings
  from tests.common import assert_close, assert_equal
label_desc: Use image node_id 15 for calling a global function with example usage: test_svi(Elbo, num_particles) without return types