code: def test_constraints():
      predictor = torch.randn(5)
      for cp in (
          torch.tensor([1, 2, 3, 4, 0]),
          torch.tensor([1, 2, 4, 3, 5]),
          torch.tensor([1, 2, 3, 4, 4]),
      ):
          with pytest.raises(ValueError):
              OrderedLogistic(predictor, cp)
  
file_path: pyro/tests/distributions/test_ordered_logistic.py
imports: import pytest
  import torch
  from torch.autograd.functional import jacobian
  from pyro.distributions import Normal, OrderedLogistic
  from pyro.distributions.transforms import OrderedTransform
label_desc: Use image node_id 2 for calling a global function with example usage: test_constraints() without return types