code: def TransformedFeaturesExtractor(
      eval_config: config_pb2.EvalConfig,
      eval_shared_model: types.MaybeMultipleEvalSharedModels,
  ) -> extractor.Extractor:
      """Creates an extractor for extracting transformed features.
  
      The extractor's PTransform loads the saved_model(s) invoking the preprocessing
      functions against every extract yielding a copy of the incoming extracts with
      a tfma.TRANSFORMED_FEATURES_KEY containing the output from the preprocessing
      functions.
  
      Args:
        eval_config: Eval config.
        eval_shared_model: Shared model (single-model evaluation) or list of shared
          models (multi-model evaluation).
  
      Returns:
        Extractor for extracting preprocessed features.
      """
      eval_shared_models = (
          model_util.verify_and_update_eval_shared_models(
              eval_shared_model
          )
      )
  
      # pylint: disable=no-value-for-parameter
      return extractor.Extractor(
          stage_name=_TRANSFORMED_FEATURES_EXTRACTOR_STAGE_NAME,
          ptransform=_ExtractTransformedFeatures(
              eval_config=eval_config,
              eval_shared_models={
                  m.model_name: m for m in eval_shared_models
              },
          ),
      )
  
file_path: model-analysis/tensorflow_model_analysis/extractors/transformed_features_extractor.py
imports: from typing import Dict
  import apache_beam
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.extractors import extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import model_util
label_desc: Use image node_id 1 for calling a global function with example usage: TransformedFeaturesExtractor(eval_config, eval_shared_model) and returns: extractor