class_docstr: A tf.TypeSpec for `AutoCompositeTensor` objects.
class_docstr_tok: ["A","tf.TypeSpec","for","`","AutoCompositeTensor","`","objects","."]
docstr: Returns a TypeSpec representing a batch of objects with this TypeSpec.
docstr_tok: ["Returns","a","TypeSpec","representing","a","batch","of","objects","with","this","TypeSpec","."]
code: def _batch(self, batch_size):
      """Returns a TypeSpec representing a batch of objects with this TypeSpec."""
      # This method recursively adds a batch dimension to all parameter Tensors.
      # Note that this may result in parameter shapes that do not broadcast. You
      # may wish to first call
      # `dist = dist._broadcast_parameters_with_batch_shape(tf.ones_like(
      # `dist.batch_shape_tensor()))` to ensure that the parameters of a
      # Distribution or analogous object will continue to broadcast after
      # batching.
      return self._copy(
          param_specs=tf.nest.map_structure(
              lambda spec: spec._batch(
                  batch_size
              ),  # pylint: disable=protected-access
              self._param_specs,
          )
      )
  
imports: import contextlib
  import functools
  import threading
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import type_spec
  from tensorflow.python.framework import type_spec_registry
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.util import tf_inspect
  from tensorflow.python.util import variable_utils
label_desc: Use image node_id 20 for calling the _AutoCompositeTensorTypeSpec obj's underlying member method code with example usage: obj._batch(batch_size) and returns: self