code: def test_improper_uniform(constraint, batch_shape, event_shape):
      d = dist.ImproperUniform(constraint, batch_shape, event_shape)
  
      value = transform_to(constraint)(
          torch.randn(batch_shape + event_shape)
      )
      assert_equal(d.log_prob(value), torch.zeros(batch_shape))
  
      with pytest.raises(NotImplementedError):
          d.sample()
      with pytest.raises(NotImplementedError):
          d.sample(sample_shape=(5, 6))
  
imports: import pytest
  import torch
  from torch.distributions import constraints, transform_to
  import pyro.distributions
  from tests.common import assert_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_improper_uniform(constraint, batch_shape, event_shape) without return types