code: def testSliceOnMetaFeature(self):
      # We want to make sure that slicing on the newly added feature works, so
      # pulling in slice here.
      with beam.Pipeline() as pipeline:
          fpls = create_fpls()
          metrics = (
              pipeline
              | "CreateTestInput" >> beam.Create(fpls)
              | "WrapFpls" >> beam.Map(wrap_fpl)
              | "ExtractInterestsNum"
              >> meta_feature_extractor.ExtractMetaFeature(
                  get_num_interests
              )
              | "ExtractSlices"
              >> slice_key_extractor.ExtractSliceKeys(
                  [
                      slicer.SingleSliceSpec(),
                      slicer.SingleSliceSpec(columns=["num_interests"]),
                  ]
              )
              | "FanoutSlices" >> slicer.FanoutSlices()
          )
  
          def check_result(got):
              try:
                  self.assertEqual(4, len(got), "got: %s" % got)
                  expected_slice_keys = [
                      (),
                      (),
                      (("num_interests", 1),),
                      (("num_interests", 2),),
                  ]
                  self.assertCountEqual(
                      sorted(slice_key for slice_key, _ in got),
                      sorted(expected_slice_keys),
                  )
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(metrics, check_result)
  
file_path: model-analysis/tensorflow_model_analysis/extractors/legacy_meta_feature_extractor_test.py
imports: 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 legacy_meta_feature_extractor
  from tensorflow_model_analysis.extractors import slice_key_extractor
  from tensorflow_model_analysis.slicer import slicer_lib
label_desc: Use image node_id 3 for calling the MetaFeatureExtractorTest obj's underlying member method code with example usage: obj.testSliceOnMetaFeature() without return types