code: def make_skew_result_equal_fn(test, expected):
      """Makes a matcher function for comparing FeatureSkew result protos."""
  
      def _matcher(actual):
          try:
              test.assertLen(actual, len(expected))
              sorted_actual = sorted(
                  actual, key=lambda a: a.feature_name
              )
              sorted_expected = sorted(
                  expected, key=lambda e: e.feature_name
              )
              for i in range(len(sorted_actual)):
                  test.assertEqual(sorted_actual[i], sorted_expected[i])
          except AssertionError as e:
              raise util.BeamAssertException(
                  traceback.format_exc()
              ) from e
  
      return _matcher
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import traceback
  from typing import Callable, Dict, Iterable, List, Optional, Tuple, Union
  from absl.testing import absltest
  import apache_beam
  from apache_beam.testing import util
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow.python.util.protobuf import compare
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 6 for calling a global function with example usage: make_skew_result_equal_fn(test, expected) and returns: _matcher