code: def main(args):
      optim = Adam({"lr": args.lr})
      elbo = JitTrace_ELBO() if args.jit else Trace_ELBO()
      svi = SVI(model, guide, optim, loss=elbo)
  
      pyro.clear_param_store()
      for j in range(args.num_epochs):
          loss = svi.step(data)
          if j % 100 == 0:
              logging.info("[epoch %04d] loss: %.4f" % (j + 1, loss))
  
      for name, value in pyro.get_param_store().items():
          logging.info(name)
          logging.info(value.detach().cpu().numpy())
  
file_path: pyro/examples/eight_schools/svi.py
imports: import argparse
  import logging
  import torch
  from data import J, sigma, y
  from torch.distributions import constraints, transforms
  import pyro
  import pyro.distributions
  from pyro.infer import SVI, JitTrace_ELBO, Trace_ELBO
  from pyro.optim import Adam
label_desc: Use image node_id 3 for calling a global function with example usage: main(args) without return types