code: def test_score_errors_non_broadcastable_data_shape(dist):
      for idx in dist.get_batch_data_indices():
          dist_params = dist.get_dist_params(idx)
          d = dist.pyro_dist(**dist_params)
          if dist.get_test_distribution_name() == "LKJCholesky":
              pytest.skip(
                  "https://github.com/pytorch/pytorch/issues/52724"
              )
          shape = d.shape()
          non_broadcastable_shape = (shape[0] + 1,) + shape[1:]
          test_data_non_broadcastable = torch.ones(
              non_broadcastable_shape
          )
          with pytest.raises((ValueError, RuntimeError)):
              d.log_prob(test_data_non_broadcastable)
  
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 8 for calling a global function with example usage: test_score_errors_non_broadcastable_data_shape(dist) without return types