class_docstr: Marginal distribution of a Multitask GP at finitely many points.
code: def _batch_shape(self, index_points=None):
      # TODO(b/249858459): Update `batch_shape_lib` so it can take override
      # parameters.
      result = batch_shape_lib.inferred_batch_shape(self)
      if index_points is not None:
          shapes = tf.nest.map_structure(
              lambda t, nd: t.shape[: -(nd + 1)],
              index_points,
              self.kernel.feature_ndims,
          )
          flat_shapes = nest.flatten_up_to(
              self.kernel.feature_ndims, shapes
          )
          return functools.reduce(
              ps.broadcast_shape, flat_shapes, result
          )
      return result
  
imports: import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import cholesky_util
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import mvn_linear_operator
  from tensorflow_probability.python.distributions.internal import stochastic_process_util
  from tensorflow_probability.python.experimental.linalg import linear_operator_unitary
  from tensorflow_probability.python.experimental.psd_kernels import multitask_kernel
  from tensorflow_probability.python.internal import batch_shape_lib
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import nest_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow.python.util import nest
label_desc: Use image node_id 11 for calling the MultiTaskGaussianProcess obj's underlying member method code with example usage: obj._batch_shape(index_points) and returns: result, functools