code: def testPreprocessedFeaturesExtractor(
      self,
      save_as_keras,
      preprocessing_function_names,
      expected_extract_keys,
  ):
      export_path = self.createModelWithMultipleDenseInputs(
          save_as_keras
      )
  
      eval_config = config_pb2.EvalConfig(
          model_specs=[
              config_pb2.ModelSpec(
                  preprocessing_function_names=preprocessing_function_names
              )
          ]
      )
      eval_shared_model = self.createTestEvalSharedModel(
          eval_saved_model_path=export_path,
          tags=[tf.saved_model.SERVING],
      )
      schema = self.createDenseInputsSchema()
      tfx_io = test_util.InMemoryTFExampleRecord(
          schema=schema,
          raw_record_column_name=constants.ARROW_INPUT_COLUMN,
      )
      tensor_adapter_config = tensor_adapter.TensorAdapterConfig(
          arrow_schema=tfx_io.ArrowSchema(),
          tensor_representations=tfx_io.TensorRepresentations(),
      )
      feature_extractor = features_extractor.FeaturesExtractor(
          eval_config=eval_config,
          tensor_representations=tensor_adapter_config.tensor_representations,
      )
      transformation_extractor = (
          transformed_features_extractor.TransformedFeaturesExtractor(
              eval_config=eval_config,
              eval_shared_model=eval_shared_model,
          )
      )
  
      examples = [
          self._makeExample(input_1=1.0, input_2=2.0),
          self._makeExample(input_1=3.0, input_2=4.0),
          self._makeExample(input_1=5.0, input_2=6.0),
      ]
  
      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=2)
              | "InputsToExtracts"
              >> model_eval_lib.BatchedInputsToExtracts()
              | feature_extractor.stage_name
              >> feature_extractor.ptransform
              | transformation_extractor.stage_name
              >> transformation_extractor.ptransform
          )
  
          # pylint: enable=no-value-for-parameter
  
          def check_result(batches):
              try:
                  self.assertLen(batches, 2)
                  for got in batches:
                      for (
                          extracts_key,
                          feature_keys,
                      ) in expected_extract_keys.items():
                          self.assertIn(extracts_key, got)
                          self.assertCountEqual(
                              set(feature_keys),
                              set(got[extracts_key]),
                              msg=f"got[{extracts_key}]={got[extracts_key]}",
                          )
  
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(result, check_result, label="result")
  
imports: import tempfile
  import unittest
  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.extractors import features_extractor
  from tensorflow_model_analysis.extractors import transformed_features_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_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 3 for calling the TransformedFeaturesExtractorTest obj's underlying member method code with example usage: obj.testPreprocessedFeaturesExtractor(save_as_keras, preprocessing_function_names, expected_extract_keys) without return types