class_docstr: TFMA benchmark.
class_docstr_tok: ["TFMA","benchmark","."]
docstr: Extract features from extracts containing arrow table.
docstr_tok: ["Extract","features","from","extracts","containing","arrow","table","."]
code: def _extract_features_and_labels(self, batched_extract):
      """Extract features from extracts containing arrow table."""
      # This function is a combination of
      # _ExtractFeatures.extract_features in extractors/features_extractor.py
      # and _ExtractLabels.extract_labels in extractors/labels_extractor.py
      result = copy.copy(batched_extract)
      (
          record_batch,
          serialized_examples,
      ) = features_extractor._drop_unsupported_columns_and_fetch_raw_data_column(  # pylint: disable=protected-access
          batched_extract[constants.ARROW_RECORD_BATCH_KEY]
      )
      features = (
          result[constants.FEATURES_KEY]
          if constants.FEATURES_KEY in result
          else {}
      )
      features.update(util.record_batch_to_tensor_values(record_batch))
      result[constants.FEATURES_KEY] = features
      result[constants.INPUT_KEY] = serialized_examples
      labels = model_util.get_feature_values_for_model_spec_field(
          list(self._eval_config.model_specs),
          "label_key",
          "label_keys",
          result,
          True,
      )
      result[constants.LABELS_KEY] = self._transform_labels(labels)
      return result
  
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 11 for calling the TFMAV2BenchmarkBase obj's underlying member method code with example usage: obj._extract_features_and_labels(batched_extract) and returns: result