code: def _ExtractMetaFeature(  # pylint: disable=invalid-name
      extracts: types.Extracts,
      new_features_fn: Callable[
          [types.FeaturesPredictionsLabels],
          types.DictOfFetchedTensorValues,
      ],
  ) -> types.Extracts:
      """Augments FPL dict with new feature(s)."""
      # Create a new feature from existing ones.
      fpl_copy = get_fpl_copy(extracts)
      new_features = new_features_fn(fpl_copy)
  
      # Add the new features to the existing ones.
      update_fpl_features(fpl_copy, new_features)
  
      result = copy.copy(extracts)
      result[constants.FEATURES_PREDICTIONS_LABELS_KEY] = fpl_copy
      return result
  
file_path: model-analysis/tensorflow_model_analysis/extractors/legacy_meta_feature_extractor.py
imports: import copy
  from typing import Any, Callable
  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
label_desc: Use image node_id 5 for calling a global function with example usage: _ExtractMetaFeature(extracts, new_features_fn) and returns: result