class_docstr: Accumulator to keep track of the current (top-k) sample of records.
class_docstr_tok: ["Accumulator","to","keep","track","of","the","current","(","top-k",")","sample","of","records","."]
code: def __init__(self):
      # Record batches to sample.
      self.record_batches = []
  
      # The total number of rows (examples) in all of `record_batches`.
      self.curr_num_rows = 0
  
      # Current total byte size of all the pa.RecordBatches accumulated.
      self.curr_byte_size = 0
  
      # This is a list of numpy array of random integers. Each element maps to one
      # row in each record batch. Each row should only be assigned a random number
      # once, in order to avoid sampling bias. Thus, we need to preserve the
      # assigned number for each accumulator, across multiple `compacts`.
      self.random_ints = []
  
imports: import collections
  import functools
  from typing import Dict, Iterable, Text, Tuple
  import apache_beam
  import numpy
  import pyarrow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import stats_util
  from tfx_bsl.arrow import table_util
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 1 to create a new _SampleRecordBatchRowsAccumulator object from inherited base classes: object with example: obj = _SampleRecordBatchRowsAccumulator()