code: def verify_evaluator(
      evaluator: Evaluator, extractors: List[extractor.Extractor]
  ):
      """Verifies evaluator is matched with an extractor.
  
      Args:
        evaluator: Evaluator to verify.
        extractors: Extractors to use in verification.
  
      Raises:
        ValueError: If an Extractor cannot be found for the Evaluator.
      """
      if (
          evaluator.run_after
          and evaluator.run_after != extractor.LAST_EXTRACTOR_STAGE_NAME
          and not any(
              evaluator.run_after == x.stage_name for x in extractors
          )
      ):
          raise ValueError(
              "Extractor matching run_after=%s for Evaluator %s not found"
              % (evaluator.run_after, evaluator.stage_name)
          )
  
file_path: model-analysis/tensorflow_model_analysis/evaluators/evaluator.py
imports: from typing import Any, Dict, Iterable, List, NamedTuple, Optional
  import apache_beam
  from tensorflow_model_analysis.extractors import extractor
label_desc: Use image node_id 1 for calling a global function with example usage: verify_evaluator(evaluator, extractors) without return types