class_docstr: Chunks blocks into shuffled batches, using a local in-memory shuffle buffer.
docstr: Whether this batcher has any batches.
docstr_tok: ["Whether","this","batcher","has","any","batches","."]
code: def has_batch(self) -> bool:
      """Whether this batcher has any batches."""
      buffer_size = self._buffer_size()
  
      if not self._done_adding:
          # Delay pulling of batches until the buffer is large enough in order to
          # amortize compaction overhead.
          return (
              self._materialized_buffer_size() >= self._buffer_min_size
              or (
                  buffer_size - self._batch_size
                  >= self._buffer_min_size
                  * SHUFFLE_BUFFER_COMPACTION_RATIO
              )
          )
      else:
          return buffer_size >= self._batch_size
  
imports: from typing import Optional
  from ray.data._internal.arrow_block import ArrowBlockAccessor
  from ray.data._internal.arrow_ops import transform_pyarrow
  from ray.data._internal.delegating_block_builder import DelegatingBlockBuilder
  from ray.data.block import Block, BlockAccessor
label_desc: Use image node_id 5 for calling the ShufflingBatcher obj's underlying member method code with example usage: obj.has_batch() and returns: unknown, unknown