code: def test_formats_confusion_counts(self):
      confusion = [
          text_format.Parse(
              """
          feature_name: "foo"
          base {
            bytes_value: "val1"
          }
          test {
            bytes_value: "val1"
          }
          count: 99
          """,
              feature_skew_results_pb2.ConfusionCount(),
          ),
          text_format.Parse(
              """
          feature_name: "foo"
          base {
            bytes_value: "val1"
          }
          test {
            bytes_value: "val2"
          }
          count: 1
          """,
              feature_skew_results_pb2.ConfusionCount(),
          ),
          text_format.Parse(
              """
          feature_name: "foo"
          base {
            bytes_value: "val2"
          }
          test {
            bytes_value: "val3"
          }
          count: 1
          """,
              feature_skew_results_pb2.ConfusionCount(),
          ),
          text_format.Parse(
              """
          feature_name: "foo"
          base {
            bytes_value: "val3"
          }
          test {
            bytes_value: "val3"
          }
          count: 100
          """,
              feature_skew_results_pb2.ConfusionCount(),
          ),
          text_format.Parse(
              """
          feature_name: "bar"
          base {
            bytes_value: "val1"
          }
          test {
            bytes_value: "val2"
          }
          count: 1
          """,
              feature_skew_results_pb2.ConfusionCount(),
          ),
      ]
      dfs = display_util.get_confusion_count_dataframes(confusion)
      self.assertSameElements(dfs.keys(), ["foo", "bar"])
      self.assertTrue(
          dfs["foo"].equals(
              pd.DataFrame(
                  [
                      [b"val1", b"val2", 1, 100, 1],
                      [b"val2", b"val3", 1, 1, 101],
                  ],
                  columns=[
                      "Base value",
                      "Test value",
                      "Pair count",
                      "Base count",
                      "Test count",
                  ],
              )
          )
      )
      self.assertTrue(
          dfs["bar"].equals(
              pd.DataFrame(
                  [[b"val1", b"val2", 1, 1, 1]],
                  columns=[
                      "Base value",
                      "Test value",
                      "Pair count",
                      "Base count",
                      "Test count",
                  ],
              )
          )
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Any, Dict
  from absl.testing import absltest
  from absl.testing import parameterized
  from google.protobuf import text_format
  import pandas
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.skew.protos import feature_skew_results_pb2
  from tensorflow_data_validation.utils import display_util
  from tensorflow_data_validation.utils import test_util
  from tensorflow_metadata.proto.v0 import anomalies_pb2
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 3 for calling the FeatureSkewTest obj's underlying member method code with example usage: obj.test_formats_confusion_counts() without return types