code: def testRegressionModel(self):
      temp_export_dir = self._getExportDir()
      (
          export_dir,
          _,
      ) = fixed_prediction_estimator_extra_fields.simple_fixed_prediction_estimator_extra_fields(
          temp_export_dir, None
      )
  
      eval_config = config_pb2.EvalConfig(
          model_specs=[
              config_pb2.ModelSpec(
                  name="model_1", signature_name="serving_default"
              )
          ]
      )
      eval_shared_model = self.createTestEvalSharedModel(
          eval_saved_model_path=export_dir,
          tags=[tf.saved_model.SERVING],
      )
      (
          tfx_io,
          feature_extractor,
      ) = self._create_tfxio_and_feature_extractor(
          eval_config,
          text_format.Parse(
              """
          feature {
            name: "prediction"
            type: FLOAT
          }
          feature {
            name: "label"
            type: FLOAT
          }
          feature {
            name: "fixed_int"
            type: INT
          }
          feature {
            name: "fixed_float"
            type: FLOAT
          }
          feature {
            name: "fixed_string"
            type: BYTES
          }
          """,
              schema_pb2.Schema(),
          ),
      )
  
      examples = [
          self._makeExample(
              prediction=0.2,
              label=1.0,
              fixed_int=1,
              fixed_float=1.0,
              fixed_string="fixed_string1",
          ),
          self._makeExample(
              prediction=0.8,
              label=0.0,
              fixed_int=1,
              fixed_float=1.0,
              fixed_string="fixed_string2",
          ),
          self._makeExample(
              prediction=0.5,
              label=0.0,
              fixed_int=2,
              fixed_float=1.0,
              fixed_string="fixed_string3",
          ),
      ]
      num_examples = len(examples)
  
      tfx_bsl_inference_ptransform = inference_base.RunInference(
          tfx_bsl_predictions_extractor.TfxBslInferenceWrapper(
              eval_config.model_specs, {"": eval_shared_model}
          ),
          output_batch_size=num_examples,
      )
  
      with beam.Pipeline() as pipeline:
          # pylint: disable=no-value-for-parameter
          result = (
              pipeline
              | "Create"
              >> beam.Create(
                  [e.SerializeToString() for e in examples],
                  reshuffle=False,
              )
              | "BatchExamples"
              >> tfx_io.BeamSource(batch_size=num_examples)
              | "InputsToExtracts"
              >> model_eval_lib.BatchedInputsToExtracts()
              | feature_extractor.stage_name
              >> feature_extractor.ptransform
              | "RunInferenceBase" >> tfx_bsl_inference_ptransform
          )
  
          # pylint: enable=no-value-for-parameter
  
          def check_result(got):
              try:
                  self.assertLen(got, 1)
                  self.assertIn(constants.PREDICTIONS_KEY, got[0])
                  self.assertAllClose(
                      np.array([[0.2], [0.8], [0.5]]),
                      got[0][constants.PREDICTIONS_KEY],
                  )
  
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(result, check_result)
  
imports: import os
  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 model_eval_lib
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fixed_prediction_estimator_extra_fields
  from tensorflow_model_analysis.extractors import features_extractor
  from tensorflow_model_analysis.extractors import inference_base
  from tensorflow_model_analysis.extractors import tfx_bsl_predictions_extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tfx_bsl.tfxio import tensor_adapter
  from tfx_bsl.tfxio import test_util
  from google.protobuf import text_format
  from tensorflow.core.protobuf import saved_model_pb2
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_serving.apis import logging_pb2
  from tensorflow_serving.apis import prediction_log_pb2
label_desc: Use image node_id 4 for calling the TfxBslPredictionsExtractorTest obj's underlying member method code with example usage: obj.testRegressionModel() without return types