class_docstr: Chunks blocks into shuffled batches, using a local in-memory shuffle buffer.
docstr: Return materialized (compacted portion of) shuffle buffer size.
docstr_tok: ["Return","materialized","(","compacted","portion","of",")","shuffle","buffer","size","."]
code: def _materialized_buffer_size(self) -> int:
      """Return materialized (compacted portion of) shuffle buffer size."""
      if self._shuffle_buffer is None:
          return 0
      # The size of the concrete (materialized) shuffle buffer, adjusting
      # for the batch head position, which also serves as a counter of the number
      # of already-yielded rows from the current concrete shuffle buffer.
      return max(
          0,
          BlockAccessor.for_block(self._shuffle_buffer).num_rows()
          - self._batch_head,
      )
  
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 7 for calling the ShufflingBatcher obj's underlying member method code with example usage: obj._materialized_buffer_size() and returns: max, int