code: def testPredict(self, features_blacklist):
      temp_eval_export_dir = self._getEvalExportDir()
      _, eval_export_dir = linear_classifier.simple_linear_classifier(
          None, temp_eval_export_dir
      )
      eval_shared_model = model_eval_lib.default_eval_shared_model(
          eval_saved_model_path=eval_export_dir,
          blacklist_feature_fetches=features_blacklist,
      )
      with beam.Pipeline() as pipeline:
          examples = [
              self._makeExample(age=3.0, language="english", label=1.0),
              self._makeExample(age=3.0, language="chinese", label=0.0),
              self._makeExample(age=4.0, language="english", label=1.0),
              self._makeExample(age=5.0, language="chinese", label=0.0),
          ]
          serialized_examples = [
              e.SerializeToString() for e in examples
          ]
  
          predict_extracts = (
              pipeline
              | beam.Create(serialized_examples, reshuffle=False)
              # Our diagnostic outputs, pass types.Extracts throughout, however our
              # aggregating functions do not use this interface.
              | beam.Map(lambda x: {constants.INPUT_KEY: x})
              | "Predict"
              >> predict_extractor._TFMAPredict(
                  eval_shared_models={"": eval_shared_model},
                  desired_batch_size=3,
              )
          )
  
          def check_result(got):
              try:
                  self.assertLen(got, 4)
                  for item in got:
                      self.assertIn(
                          constants.FEATURES_PREDICTIONS_LABELS_KEY,
                          item,
                      )
                      fpl = item[
                          constants.FEATURES_PREDICTIONS_LABELS_KEY
                      ]
                      # Verify fpl contains features, probabilities, and correct labels.
                      blacklisted_features = set(
                          features_blacklist or []
                      )
                      expected_features = (
                          set(["language", "age", "label"])
                          - blacklisted_features
                      )
                      for feature in expected_features:
                          self.assertIn(feature, fpl.features)
                      for feature in blacklisted_features:
                          self.assertNotIn(feature, fpl.features)
                      self.assertAlmostEqual(
                          fpl.features["label"], fpl.labels["__labels"]
                      )
  
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(predict_extracts, check_result)
  
imports: import os
  from absl.testing import parameterized
  import apache_beam
  from apache_beam.testing import util
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import model_eval_lib
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.eval_saved_model.example_trainers import batch_size_limited_classifier
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fake_multi_examples_per_input_estimator
  from tensorflow_model_analysis.eval_saved_model.example_trainers import linear_classifier
  from tensorflow_model_analysis.extractors import legacy_predict_extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tfx_bsl.tfxio import raw_tf_record
label_desc: Use image node_id 2 for calling the PredictExtractorTest obj's underlying member method code with example usage: obj.testPredict(features_blacklist) without return types