code: def make_sample_equal_fn(test, expected_size, potential_samples):
      """Makes a matcher function for checking SkewPair results."""
  
      def _matcher(actual):
          try:
              test.assertLen(actual, expected_size)
              for each in actual:
                  test.assertTrue(each in potential_samples)
          except AssertionError:
              raise util.BeamAssertException(traceback.format_exc())
  
      return _matcher
  
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 3 for calling a global function with example usage: make_sample_equal_fn(test, expected_size, potential_samples) and returns: _matcher