class_docstr: Bijector to associate a numeric inverse with any invertible function.
class_docstr_tok: ["Bijector","to","associate","a","numeric","inverse","with","any","invertible","function","."]
code: def _batch_shape(self, x_event_ndims):
      try:
          # Trace the function to extract its batch shape without executing it.
          fn_shape = callable_util.get_output_spec(
              lambda x: self.bound_fn(
                  self.domain_constraint_fn(x)
              ),  # pylint: disable=not-callable
              tf.TensorSpec(
                  [], dtype=self.dtype if self.dtype else tf.float32
              ),
          ).shape
      except TypeError:  # `dtype` wasn't specified.
          return tf.TensorShape(None)
  
      fn_rank = tensorshape_util.rank(fn_shape)
      if fn_rank is not None:
          return fn_shape[: fn_rank - x_event_ndims]
      return fn_shape
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.internal import callable_util
  from tensorflow_probability.python.internal import custom_gradient
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math import root_search
label_desc: Use image node_id 8 for calling the ScalarFunctionWithInferredInverse obj's underlying member method code with example usage: obj._batch_shape(x_event_ndims) and returns: fn_shape, fn_shape, tf