code: def _draw_domain_tensor(
      self, bijector, data, event_dim, sample_shape=()
  ):
      # TODO(axch): Would be nice to get rid of all this shape inference logic and
      # just rely on a notion of batch and event shape for bijectors, so we can
      # pass those through `domain_tensors` and `codomain_tensors` and use
      # `tensors_in_support`.  However, `RationalQuadraticSpline` behaves weirdly
      # somehow and I got confused.
      codomain_event_shape = [
          event_dim
      ] * bijector.inverse_min_event_ndims
      codomain_event_shape = constrain_inverse_shape(
          bijector, codomain_event_shape
      )
      shp = bijector.inverse_event_shape(codomain_event_shape)
      shp = functools.reduce(
          tensorshape_util.concatenate,
          [
              sample_shape,
              data.draw(
                  tfp_hps.broadcast_compatible_shape(
                      shp[
                          : shp.ndims - bijector.forward_min_event_ndims
                      ]
                  )
              ),
              shp[shp.ndims - bijector.forward_min_event_ndims :],
          ],
      )
      xs = tf.identity(
          data.draw(domain_tensors(bijector, shape=shp)), name="xs"
      )
  
      return xs
  
imports: import collections
  import functools
  from absl.testing import parameterized
  import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python import bijectors
  from tensorflow_probability.python import util
  from tensorflow_probability.python.bijectors import hypothesis_testlib
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import prefer_static
  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.python.util import nest
label_desc: Use image node_id 2 for calling the BijectorPropertiesTest obj's underlying member method code with example usage: obj._draw_domain_tensor(bijector, data, event_dim, sample_shape) and returns: xs