code: def test_confusion_analysis(self):
      baseline_examples = [
          _make_ex("id0", "foo", "foo"),
          _make_ex("id1", "foo", "foo"),
          _make_ex("id2", "foo", "foo"),
          _make_ex("id3", "foo", "foo"),
          _make_ex("id4", "bar", "bar"),
          _make_ex("id5", "bar", "bar"),
          _make_ex("id6", "baz", "baz"),
          _make_ex("id7", "zip", "zap"),
      ]
      test_examples = [
          _make_ex("id0", "foo", "foo"),
          _make_ex("id1", "zim", "foo"),
          _make_ex("id2", "foo", "foo"),
          _make_ex("id3", "bar", "foo"),
          _make_ex("id4", "bar", "bar"),
          _make_ex("id5", "foo", "bar"),
          _make_ex("id6", "baz", "baz"),
          _make_ex("id7", "", "zap"),
      ]
  
      def _confusion_result(
          base: str, test: str, feature_name: str, count: int
      ) -> feature_skew_results_pb2.ConfusionCount:
          result = feature_skew_results_pb2.ConfusionCount(
              feature_name=feature_name, count=count
          )
          result.base.bytes_value = base.encode("utf8")
          result.test.bytes_value = test.encode("utf8")
          return result
  
      expected_result = [
          _confusion_result("foo", "foo", "value_noskew", 4),
          _confusion_result("bar", "bar", "value_noskew", 2),
          _confusion_result("baz", "baz", "value_noskew", 1),
          _confusion_result("foo", "foo", "value_skew", 2),
          _confusion_result("foo", "zim", "value_skew", 1),
          _confusion_result("foo", "bar", "value_skew", 1),
          _confusion_result("bar", "bar", "value_skew", 1),
          _confusion_result("bar", "foo", "value_skew", 1),
          _confusion_result("baz", "baz", "value_skew", 1),
          _confusion_result(
              "zip", "__MISSING_VALUE__", "value_skew", 1
          ),
          _confusion_result("zap", "zap", "value_noskew", 1),
      ]
  
      with beam.Pipeline(
          runner=beam_runner_util.get_test_runner()
      ) as p:
          baseline_examples = p | "Create Base" >> beam.Create(
              baseline_examples
          )
          test_examples = p | "Create Test" >> beam.Create(
              test_examples
          )
          confusion_counts = (
              (baseline_examples, test_examples)
              | feature_skew_detector.DetectFeatureSkewImpl(
                  ["id"],
                  confusion_configs=[
                      feature_skew_detector.ConfusionConfig(
                          name="value_skew"
                      ),
                      feature_skew_detector.ConfusionConfig(
                          name="value_noskew"
                      ),
                  ],
              )
          )[feature_skew_detector.CONFUSION_KEY]
          util.assert_that(
              confusion_counts,
              test_util.make_confusion_count_result_equal_fn(
                  self, expected_result
              ),
          )
  
imports: import traceback
  from absl.testing import absltest
  from absl.testing import parameterized
  import apache_beam
  from apache_beam.testing import util
  import tensorflow
  from tensorflow_data_validation.utils import beam_runner_util
  from tensorflow_data_validation.skew import feature_skew_detector
  from tensorflow_data_validation.skew.protos import feature_skew_results_pb2
  from tensorflow_data_validation.utils import test_util
  from google.protobuf import text_format
label_desc: Use image node_id 13 for calling the FeatureSkewDetectorTest obj's underlying member method code with example usage: obj.test_confusion_analysis() and returns: result