code: def elbo_test_case(backend, jit, expected_elbo, data, steps=None):
      if torch.__version__.startswith("2"):
          pytest.xfail(
              reason="https://github.com/pyro-ppl/pyro/issues/3221"
          )
      with pyro_backend(backend):
          Elbo = infer.JitTrace_ELBO if jit else infer.Trace_ELBO
          elbo = Elbo(ignore_jit_warnings=True)
          if steps:
              assert_ok(
                  constrained_model,
                  guide_constrained_model,
                  elbo,
                  steps,
                  data,
              )
          if backend == "pyro":
              # TODO: this is a difference between the two implementations
              elbo = elbo.loss
          with torch.no_grad():
              actual = elbo(
                  constrained_model, guide_constrained_model, data
              )
          assert actual == approx(expected_elbo, rel=0.1)
  
imports: import warnings
  import pytest
  import torch
  from pytest import approx
  from torch.distributions import constraints
  from pyro.generic import distributions
  from pyro.generic import infer, ops, optim, pyro, pyro_backend
  from tests.common import assert_close, xfail_param
label_desc: Use image node_id 16 for calling a global function with example usage: elbo_test_case(backend, jit, expected_elbo, data, steps) without return types