code: def test_constraints(backend, jit):
      data = torch.tensor(0.5)
  
      with pyro_backend(backend):
          Elbo = infer.JitTrace_ELBO if jit else infer.Trace_ELBO
          elbo = Elbo(ignore_jit_warnings=True)
          steps = 2
          assert_ok(
              constrained_model,
              guide_constrained_model,
              elbo,
              steps,
              data,
          )
  
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 13 for calling a global function with example usage: test_constraints(backend, jit) without return types