code: def _make_sklearn_predict_extractor(
      eval_shared_model: tfma.EvalSharedModel,
  ) -> tfma.extractors.Extractor:
      """Creates an extractor for performing predictions using a scikit-learn model.
  
      The extractor's PTransform loads and runs the serving pickle against
      every extract yielding a copy of the incoming extracts with an additional
      extract added for the predictions keyed by tfma.PREDICTIONS_KEY. The model
      inputs are searched for under tfma.FEATURES_KEY.
  
      Args:
        eval_shared_model: Shared model (single-model evaluation).
  
      Returns:
        Extractor for extracting predictions.
      """
      eval_shared_models = (
          tfma.utils.verify_and_update_eval_shared_models(
              eval_shared_model
          )
      )
      return tfma.extractors.Extractor(
          stage_name=_PREDICT_EXTRACTOR_STAGE_NAME,
          ptransform=_ExtractPredictions(  # pylint: disable=no-value-for-parameter
              eval_shared_models={
                  m.model_name: m for m in eval_shared_models
              }
          ),
      )
  
file_path: tfx/tfx/examples/penguin/experimental/sklearn_predict_extractor.py
imports: import copy
  import os
  import pickle
  from typing import Dict, Iterable, List
  import apache_beam
  import tensorflow
  import tensorflow_model_analysis
  from tfx_bsl.tfxio import tensor_adapter
label_desc: Use image node_id 1 for calling a global function with example usage: _make_sklearn_predict_extractor(eval_shared_model) and returns: tfma