code: def _ExtractFeatures(
      extracts: beam.pvalue.PCollection,
      additional_extracts: Optional[List[str]] = None,
      excludes: Optional[List[bytes]] = None,
      source: str = constants.FEATURES_PREDICTIONS_LABELS_KEY,
      dest: str = constants.MATERIALIZE_COLUMNS,
  ) -> beam.pvalue.PCollection:
      """Builds MaterializedColumn extracts from FPL created in evaluate.Predict().
  
      It must be the case that the PredictExtractor was called before calling this
      function.
  
      Args:
        extracts: PCollection containing the Extracts that will have
          MaterializedColumn added to.
        additional_extracts: Optional list of additional extracts to include along
          with the features, predictions, and labels.
        excludes: Optional list of strings containing features, predictions, or
          labels to exclude from materialization.
        source: Source for extracting features. Currently it supports extracting
          features from FPLs and input tf.Example protos.
        dest: Destination for extracted features. Currently supported are adding
          materialized columns, or the features dict of the FPLs.
  
      Returns:
        PCollection of Extracts
      """
      return extracts | "MaterializeFeatures" >> beam.Map(
          _MaterializeFeatures,
          additional_extracts=additional_extracts,
          excludes=excludes,
          source=source,
          dest=dest,
      )
  
file_path: model-analysis/tensorflow_model_analysis/extractors/legacy_feature_extractor.py
imports: import copy
  from typing import Any, Dict, List, Optional
  from absl import logging
  import apache_beam
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_saved_model import encoding
  from tensorflow_model_analysis.extractors import extractor
  from tensorflow_model_analysis.utils import util
label_desc: Use image node_id 5 for calling a global function with example usage: _ExtractFeatures(extracts, additional_extracts, excludes, source, dest) and returns: unknown