code: def testSetMatchPreprocessor(
      self, extracts, expected_inputs, preprocessor
  ):
      with beam.Pipeline() as p:
          updated_pcoll = (
              p
              | "Create" >> beam.Create([extracts])
              | "Preprocess" >> beam.ParDo(preprocessor)
          )
  
          def check_result(result):
              # Only single extract case is tested
              self.assertLen(result, len(expected_inputs))
              for updated_extracts, expected_input in zip(
                  result, expected_inputs
              ):
                  self.assertIn(
                      constants.PREDICTIONS_KEY, updated_extracts
                  )
                  np.testing.assert_allclose(
                      updated_extracts[constants.PREDICTIONS_KEY],
                      expected_input[constants.PREDICTIONS_KEY],
                  )
                  self.assertIn(constants.LABELS_KEY, updated_extracts)
                  np.testing.assert_allclose(
                      updated_extracts[constants.LABELS_KEY],
                      expected_input[constants.LABELS_KEY],
                  )
                  if constants.EXAMPLE_WEIGHTS_KEY in expected_input:
                      self.assertIn(
                          constants.EXAMPLE_WEIGHTS_KEY,
                          updated_extracts,
                      )
                      np.testing.assert_allclose(
                          updated_extracts[
                              constants.EXAMPLE_WEIGHTS_KEY
                          ],
                          expected_input[constants.EXAMPLE_WEIGHTS_KEY],
                      )
  
          beam_testing_util.assert_that(updated_pcoll, check_result)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import apache_beam
  from apache_beam.testing import util
  import numpy
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.metrics.preprocessors import set_match_preprocessors
  from tensorflow_model_analysis.utils import util
label_desc: Use image node_id 1 for calling the SetMatchPreprocessorTest obj's underlying member method code with example usage: obj.testSetMatchPreprocessor(extracts, expected_inputs, preprocessor) without return types