code: def Extract(  # pylint: disable=invalid-name
      extracts: beam.pvalue.PCollection,
      extractors: List[extractor.Extractor],
  ):
      for x in extractors:
          extracts = extracts | x.stage_name >> x.ptransform
      return extracts
  
imports: from typing import Any, Dict, List, Optional
  import apache_beam
  from apache_beam.testing import util
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import model_eval_lib
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_saved_model import load
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.evaluators import legacy_metrics_and_plots_evaluator
  from tensorflow_model_analysis.extractors import extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.slicer import slicer_lib
  from tfx_bsl.tfxio import raw_tf_record
label_desc: Use image node_id 1 for calling a global function with example usage: Extract(extracts, extractors) and returns: extracts