code: def test_svi_irregular_batch_size(Elbo):
      pyro.clear_param_store()
  
      @poutine.broadcast
      def model(data):
          loc = pyro.param("loc", constant(0.0))
          scale = pyro.param(
              "scale", constant(1.0), constraint=constraints.positive
          )
          with pyro.plate("data", data.shape[0]):
              pyro.sample(
                  "x",
                  dist.Normal(loc, scale).expand([data.shape[0]]),
                  obs=data,
              )
  
      def guide(data):
          pass
  
      pyro.clear_param_store()
      elbo = Elbo(strict_enumeration_warning=False, max_plate_nesting=1)
      inference = SVI(model, guide, Adam({"lr": 1e-6}), elbo)
      inference.step(torch.ones(10))
      inference.step(torch.ones(3))
  
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 18 for calling a global function with example usage: test_svi_irregular_batch_size(Elbo) without return types