code: def check_event_space_bijector_constrains(self, dist, data):
      event_space_bijector = (
          dist.experimental_default_event_space_bijector()
      )
      if event_space_bijector is None:
          return
  
      # Draw a sample shape
      sample_shape = data.draw(tfp_hps.shapes())
      inv_event_shape = event_space_bijector.inverse_event_shape(
          tensorshape_util.concatenate(
              dist.batch_shape, dist.event_shape
          )
      )
  
      # Draw a shape that broadcasts with `[batch_shape, inverse_event_shape]`
      # where `inverse_event_shape` is the event shape in the bijector's
      # domain. This is the shape of `y` in R**n, such that
      # x = event_space_bijector(y) has the event shape of the distribution.
  
      # TODO(b/174778703): Actually draw broadcast compatible shapes.
      batch_inv_event_compat_shape = inv_event_shape
      # batch_inv_event_compat_shape = data.draw(
      #     tfp_hps.broadcast_compatible_shape(inv_event_shape))
      # batch_inv_event_compat_shape = tensorshape_util.concatenate(
      #     (1,) * (len(inv_event_shape) - len(batch_inv_event_compat_shape)),
      #     batch_inv_event_compat_shape)
  
      total_sample_shape = tensorshape_util.concatenate(
          sample_shape, batch_inv_event_compat_shape
      )
      # full_sample_batch_event_shape = tensorshape_util.concatenate(
      #     sample_shape, inv_event_shape)
  
      y = data.draw(
          tfp_hps.constrained_tensors(
              tfp_hps.identity_fn, total_sample_shape.as_list()
          )
      )
      hp.note("Trying to constrain inputs {}".format(y))
      with tfp_hps.no_tf_rank_errors():
          x = event_space_bijector(y)
          hp.note("Got constrained samples {}".format(x))
          with tf.control_dependencies(
              dist._sample_control_dependencies(x)
          ):
              self.evaluate(tensor_util.identity_as_tensor(x))
  
imports: import collections
  from absl.testing import parameterized
  import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python import distributions
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.bijectors import expm1
  from tensorflow_probability.python.bijectors import normal_cdf
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import hypothesis_testlib
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math.psd_kernels import hypothesis_testlib
label_desc: Use image node_id 1 for calling the EventSpaceBijectorsTest obj's underlying member method code with example usage: obj.check_event_space_bijector_constrains(dist, data) without return types