code: def __init__(self, block_type):
      # The set of uncompacted Python values buffered.
      self._columns = collections.defaultdict(list)
      # The column names of uncompacted Python values buffered.
      self._column_names = None
      # The set of compacted tables we have built so far.
      self._tables: List[Any] = []
      # Cursor into tables indicating up to which table we've accumulated table sizes.
      # This is used to defer table size calculation, which can be expensive for e.g.
      # Pandas DataFrames.
      # This cursor points to the first table for which we haven't accumulated a table
      # size.
      self._tables_size_cursor = 0
      # Accumulated table sizes, up to the table in _tables pointed to by
      # _tables_size_cursor.
      self._tables_size_bytes = 0
      # Size estimator for un-compacted table values.
      self._uncompacted_size = SizeEstimator()
      self._num_rows = 0
      self._num_compactions = 0
      self._block_type = block_type
  
imports: import collections
  from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Mapping, TypeVar, Union
  import numpy
  from ray.air.constants import TENSOR_COLUMN_NAME
  from ray.data._internal.block_builder import BlockBuilder
  from ray.data._internal.numpy_support import convert_udf_returns_to_numpy, is_array_like
  from ray.data._internal.size_estimator import SizeEstimator
  from ray.data.block import Block, BlockAccessor
  from ray.data.row import TableRow
label_desc: Use image node_id 1 to create a new TableBlockBuilder object from inherited base classes: BlockBuilder with example: obj = TableBlockBuilder(block_type)