code: def test_end_to_end(model):
      # Test training.
      model = AutoReparam()(model)
      guide = AutoNormal(model)
      svi = SVI(model, guide, Adam({"lr": 1e-9}), Trace_ELBO())
      for step in range(3):
          svi.step()
  
      # Test prediction.
      predictive = Predictive(model, guide=guide, num_samples=2)
      samples = predictive()
      assert set("abc").issubset(samples.keys())
  
imports: import pytest
  import torch
  import pyro
  import pyro.distributions
  from pyro import poutine
  from pyro.infer import SVI, Predictive, Trace_ELBO
  from pyro.infer.autoguide import AutoNormal
  from pyro.infer.reparam import AutoReparam, MinimalReparam
  from pyro.optim import Adam
label_desc: Use image node_id 14 for calling a global function with example usage: test_end_to_end(model) without return types