code: def test_zip_shape():
      gate = torch.ones(3, 2) / 2
      rate = torch.ones(3, 2) / 2
      d = dist.ZeroInflatedPoisson(rate, gate=gate)
      assert d.batch_shape == (3, 2)
      assert d.event_shape == ()
      assert d.shape() == (3, 2)
      assert d.sample().size() == d.shape()
  
file_path: pyro/tests/distributions/test_shapes.py
imports: import torch
  import pyro.distributions
label_desc: Use image node_id 5 for calling a global function with example usage: test_zip_shape() without return types