code: def testSqlSliceKeyExtractorWithTransformedFeatures(self):
      eval_config = config_pb2.EvalConfig(
          model_specs=[
              config_pb2.ModelSpec(name="model1"),
              config_pb2.ModelSpec(name="model2"),
          ],
          slicing_specs=[
              config_pb2.SlicingSpec(
                  slice_keys_sql="""
              SELECT
                STRUCT(fixed_string)
              FROM
                example.fixed_string,
                example.fixed_int
              WHERE fixed_int = 1
              """
              )
          ],
      )
      slice_key_extractor = (
          sql_slice_key_extractor.SqlSliceKeyExtractor(eval_config)
      )
  
      extracts = {
          constants.FEATURES_KEY: {
              "fixed_int": np.array([1, 1, 2]),
          },
          constants.TRANSFORMED_FEATURES_KEY: {
              "model1": {
                  "fixed_int": np.array([1, 1, 2]),
                  "fixed_float": np.array([1.0, 1.0, 0.0]),
                  "fixed_string": np.array(
                      [
                          "fixed_string1",
                          "fixed_string2",
                          "fixed_string3",
                      ]
                  ),
              },
              "model2": {
                  "fixed_int": np.array([1, 1, 2]),
                  "fixed_string": np.array(
                      [
                          "fixed_string1",
                          "fixed_string2",
                          "fixed_string3",
                      ]
                  ),
              },
          },
      }
  
      with beam.Pipeline() as pipeline:
          # pylint: disable=no-value-for-parameter
          result = (
              pipeline
              | "CreateTestInput" >> beam.Create([extracts])
              | slice_key_extractor.stage_name
              >> slice_key_extractor.ptransform
          )
  
          # pylint: enable=no-value-for-parameter
  
          def check_result(got):
              try:
                  self.assertLen(got, 1)
                  np.testing.assert_equal(
                      got[0][constants.SLICE_KEY_TYPES_KEY],
                      types.VarLenTensorValue.from_dense_rows(
                          [
                              slicer_lib.slice_keys_to_numpy_array(
                                  [(("fixed_string", "fixed_string1"),)]
                              ),
                              slicer_lib.slice_keys_to_numpy_array(
                                  [(("fixed_string", "fixed_string2"),)]
                              ),
                              np.array([]),
                          ]
                      ),
                  )
  
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(result, check_result)
  
imports: import apache_beam
  from apache_beam.testing import util
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import model_eval_lib
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.extractors import features_extractor
  from tensorflow_model_analysis.extractors import sql_slice_key_extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.slicer import slicer_lib
  from tfx_bsl.tfxio import tf_example_record
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 2 for calling the SqlSliceKeyExtractorTest obj's underlying member method code with example usage: obj.testSqlSliceKeyExtractorWithTransformedFeatures() without return types