code: def testMultiModelPredict(self):
      temp_eval_export_dir = self._getEvalExportDir()
      _, model1_dir = linear_classifier.simple_linear_classifier(
          None, temp_eval_export_dir
      )
      model1 = model_eval_lib.default_eval_shared_model(
          eval_saved_model_path=model1_dir
      )
      _, model2_dir = linear_classifier.simple_linear_classifier(
          None, temp_eval_export_dir
      )
      model2 = model_eval_lib.default_eval_shared_model(
          eval_saved_model_path=model2_dir
      )
      eval_shared_model = {"model1": model1, "model2": model2}
      eval_config = config_pb2.EvalConfig(
          model_specs=[
              config_pb2.ModelSpec(
                  name="model1", example_weight_key="age"
              ),
              config_pb2.ModelSpec(
                  name="model2", example_weight_key="age"
              ),
          ]
      )
  
      tfx_io = raw_tf_record.RawBeamRecordTFXIO(
          physical_format="inmemory",
          raw_record_column_name=constants.ARROW_INPUT_COLUMN,
          telemetry_descriptors=["TFMATest"],
      )
      extractor = predict_extractor.PredictExtractor(
          eval_shared_model, eval_config=eval_config
      )
      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)
              | "BatchExamples" >> tfx_io.BeamSource(batch_size=2)
              | "InputsToExtracts"
              >> model_eval_lib.BatchedInputsToExtracts()
              | "Predict" >> extractor.ptransform
          )
  
          def check_result(got):
              try:
                  self.assertLen(got, 2)
                  for item in got:
                      self.assertIn(constants.FEATURES_KEY, item)
                      for feature in ("language", "age"):
                          for features_dict in item[
                              constants.FEATURES_KEY
                          ]:
                              self.assertIn(feature, features_dict)
                      self.assertIn(constants.LABELS_KEY, item)
                      self.assertIn(constants.PREDICTIONS_KEY, item)
                      for model in ("model1", "model2"):
                          for predictions_dict in item[
                              constants.PREDICTIONS_KEY
                          ]:
                              self.assertIn(model, predictions_dict)
                      self.assertIn(constants.EXAMPLE_WEIGHTS_KEY, item)
                      for i in range(len(item[constants.FEATURES_KEY])):
                          self.assertAlmostEqual(
                              item[constants.FEATURES_KEY][i]["age"],
                              item[constants.EXAMPLE_WEIGHTS_KEY][i],
                          )
  
              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 3 for calling the PredictExtractorTest obj's underlying member method code with example usage: obj.testMultiModelPredict() without return types