code: def testLegacySliceKeys(self):
      with beam.Pipeline() as pipeline:
          fpls = create_fpls()
          slice_keys_extracts = (
              pipeline
              | "CreateTestInput" >> beam.Create(fpls)
              | "WrapFpls" >> beam.Map(wrap_fpl)
              | "ExtractSlices"
              >> slice_key_extractor.ExtractSliceKeys(
                  [
                      slicer.SingleSliceSpec(),
                      slicer.SingleSliceSpec(columns=["gender"]),
                  ]
              )
          )
  
          def check_result(got):
              try:
                  self.assertLen(got, 2)
                  expected_results = sorted(
                      [
                          [(), (("gender", "f"),)],
                          [(), (("gender", "m"),)],
                      ]
                  )
                  got_results = []
                  for item in got:
                      self.assertIn(constants.SLICE_KEY_TYPES_KEY, item)
                      got_results.append(
                          sorted(item[constants.SLICE_KEY_TYPES_KEY])
                      )
                  self.assertCountEqual(got_results, expected_results)
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(slice_keys_extracts, check_result)
  
file_path: model-analysis/tensorflow_model_analysis/extractors/slice_key_extractor_test.py
imports: from absl.testing import parameterized
  import apache_beam
  from apache_beam.testing import util
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.extractors import slice_key_extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.slicer import slicer_lib
label_desc: Use image node_id 2 for calling the SliceTest obj's underlying member method code with example usage: obj.testLegacySliceKeys() without return types