code: def test_enumerate_support_shape(dist):
      if not dist.pyro_dist.has_enumerate_support:
          pytest.skip()
      for idx in range(dist.get_num_test_data()):
          dist_params = dist.get_dist_params(idx)
          d = dist.pyro_dist(**dist_params)
          with xfail_if_not_implemented():
              support = d.enumerate_support()
              n = support.shape[0]
              assert (
                  support.shape == (n,) + d.batch_shape + d.event_shape
              )
  
              support_expanded = d.enumerate_support(expand=True)
              assert_equal(support, support_expanded)
  
              support_unexpanded = d.enumerate_support(expand=False)
              assert (
                  support_unexpanded.shape
                  == (n,) + (1,) * len(d.batch_shape) + d.event_shape
              )
              assert (support_expanded == support_unexpanded).all()
  
imports: import numpy
  import pytest
  import torch
  import pyro
  import pyro.distributions
  from pyro.distributions import TorchDistribution
  from pyro.distributions.testing.gof import auto_goodness_of_fit
  from pyro.distributions.util import broadcast_shape
  from tests.common import TEST_FAILURE_RATE, assert_close, assert_equal, xfail_if_not_implemented
label_desc: Use image node_id 16 for calling a global function with example usage: test_enumerate_support_shape(dist) without return types