class_docstr: TFMA benchmark.
class_docstr_tok: ["TFMA","benchmark","."]
docstr: Read the raw dataset and massage examples into batched Extracts.
docstr_tok: ["Read","the","raw","dataset","and","massage","examples","into","batched","Extracts","."]
code: def _readDatasetIntoBatchedExtracts(self):
      """Read the raw dataset and massage examples into batched Extracts."""
      serialized_examples = list(
          self._dataset.read_raw_dataset(
              deserialize=False, limit=self._max_num_examples()
          )
      )
  
      # TODO(b/153996019): Once the TFXIO interface that returns an iterator of
      # RecordBatch is available, clean this up.
      coder = example_coder.ExamplesToRecordBatchDecoder(
          serialized_schema=benchmark_utils.read_schema(
              self._dataset.tf_metadata_schema_path()
          ).SerializeToString()
      )
      batches = []
      for i in range(0, len(serialized_examples), _BATCH_SIZE):
          example_batch = serialized_examples[i : i + _BATCH_SIZE]
          record_batch = record_based_tfxio.AppendRawRecordColumn(
              coder.DecodeBatch(example_batch),
              constants.ARROW_INPUT_COLUMN,
              example_batch,
          )
          batches.append(
              {constants.ARROW_RECORD_BATCH_KEY: record_batch}
          )
      return batches
  
imports: import copy
  import time
  import apache_beam
  import numpy
  import tensorflow
  import tensorflow_model_analysis
  from tensorflow_model_analysis.evaluators import metrics_plots_and_validations_evaluator
  from tensorflow_model_analysis.evaluators import poisson_bootstrap
  from tensorflow_model_analysis.extractors import example_weights_extractor
  from tensorflow_model_analysis.extractors import features_extractor
  from tensorflow_model_analysis.extractors import labels_extractor
  from tensorflow_model_analysis.extractors import legacy_input_extractor
  from tensorflow_model_analysis.extractors import predictions_extractor
  from tensorflow_model_analysis.extractors import unbatch_extractor
  import tfx
  from tfx.benchmarks import benchmark_utils
  from tfx.benchmarks import benchmark_base
  from tfx_bsl.coders import example_coder
  from tfx_bsl.tfxio import record_based_tfxio
  from tfx_bsl.tfxio import test_util
label_desc: Use image node_id 9 for calling the TFMAV2BenchmarkBase obj's underlying member method code with example usage: obj._readDatasetIntoBatchedExtracts() and returns: batches