code: def test_distribution_validate_args(dist_class, args, validate_args):
      with pyro.validation_enabled(validate_args):
          if not validate_args:
              dist_class(**args)
          else:
              with pytest.raises(ValueError):
                  dist_class(**args)
  
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 17 for calling a global function with example usage: test_distribution_validate_args(dist_class, args, validate_args) without return types