code: def testMaterializedLegacySliceKeys(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"]),
                  ],
                  materialize=True,
              )
          )
  
          def check_result(got):
              try:
                  self.assertLen(got, 2)
                  expected_results = [
                      types.MaterializedColumn(
                          name=constants.SLICE_KEYS_KEY,
                          value=[b"Overall", b"gender:f"],
                      ),
                      types.MaterializedColumn(
                          name=constants.SLICE_KEYS_KEY,
                          value=[b"Overall", b"gender:m"],
                      ),
                  ]
                  got_results = []
                  for item in got:
                      self.assertIn(constants.SLICE_KEYS_KEY, item)
                      got_result = item[constants.SLICE_KEYS_KEY]
                      got_results.append(
                          got_result._replace(
                              value=sorted(got_result.value)
                          )
                      )
                  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 3 for calling the SliceTest obj's underlying member method code with example usage: obj.testMaterializedLegacySliceKeys() without return types