code: def test_expand():
      predictor = torch.randn(4, 5)
      cutpoints = torch.sort(torch.randn(5, 6)).values
      dist = OrderedLogistic(predictor, cutpoints, validate_args=True)
      new_batch_shape = (2, 3, 4, 5)
      dist = dist.expand(new_batch_shape)
      assert dist.batch_shape == torch.Size(new_batch_shape)
      assert dist.event_shape == torch.Size(())
      sample = dist.sample([100])
      assert torch.all(sample <= 6).item()
  
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 4 for calling a global function with example usage: test_expand() without return types