code: def _yield_confusion_pairs(
      ex_base: tf.train.Example,
      ex_test: tf.train.Example,
      configs: List[ConfusionConfig],
  ) -> Iterator[
      Tuple[
          _ConfusionFeatureValue,
          _ConfusionFeatureValue,
          types.FeatureName,
      ]
  ]:
      """Yield base/test value pairs from a matching pair of examples."""
      for config in configs:
          base_val = _get_confusion_feature_value(ex_base, config.name)
          test_val = _get_confusion_feature_value(ex_test, config.name)
          if base_val is not None and test_val is not None:
              yield base_val, test_val, config.name
  
imports: from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Union
  import apache_beam
  import farmhash
  import numpy
  import tensorflow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.utils import artifacts_io_impl
  from tensorflow_data_validation.skew.protos import feature_skew_results_pb2
label_desc: Use image node_id 8 for calling a global function with example usage: _yield_confusion_pairs(ex_base, ex_test, configs) without return types