code: def testGaussianizeSparse(self, input_dtype, elementwise):
      def preprocessing_fn(inputs):
          x_gaussianized = tft.scale_to_gaussian(
              tf.cast(inputs["x"], input_dtype), elementwise=elementwise
          )
          self.assertEqual(
              x_gaussianized.dtype,
              impl_test._mean_output_dtype(input_dtype),
          )
          return {"x_gaussianized": tf.cast(x_gaussianized, tf.float32)}
  
      input_data_values = [
          516,
          -871,
          737,
          415,
          584,
          583,
          152,
          479,
          576,
          409,
          591,
          844,
          -16,
          508,
          669,
          617,
          502,
          532,
          517,
          479,
      ]
      input_data = []
      for idx, v in enumerate(input_data_values):
          input_data.append(
              {
                  "idx0": [1, 1],
                  "idx1": [0, 1],
                  "val": [v, -input_data_values[-1 - idx]],
              }
          )
      input_metadata = tft.DatasetMetadata.from_feature_spec(
          {
              "x": tf.io.SparseFeature(
                  ["idx0", "idx1"],
                  "val",
                  tft_unit.canonical_numeric_dtype(input_dtype),
                  (4, 5),
              )
          }
      )
      if elementwise:
          expected_data_values = [
              -0.09304726,
              -2.24682532,
              1.56900163,
              -0.78244931,
              0.48285998,
              0.47461339,
              -1.50929952,
              -0.39008015,
              0.41659823,
              -0.81174337,
              0.54027596,
              2.11624695,
              -1.72816411,
              -0.16046759,
              1.13320023,
              0.74814557,
              -0.21014091,
              0.04373742,
              -0.08454805,
              -0.39008015,
          ]
      else:
          expected_data_values = [
              0.91555131,
              -1.54543642,
              1.30767697,
              0.73634456,
              1.03620536,
              1.03443104,
              0.26969729,
              0.84990131,
              1.02201077,
              0.72569862,
              1.04862563,
              1.49752966,
              -0.02838919,
              0.90135672,
              1.18702292,
              1.09475806,
              0.89071077,
              0.9439405,
              0.91732564,
              0.84990131,
          ]
      expected_data = []
      for idx, v in enumerate(expected_data_values):
          expected_data.append(
              {
                  "x_gaussianized$sparse_values": (
                      [v, -expected_data_values[-1 - idx]]
                  ),
                  "x_gaussianized$sparse_indices_0": [1, 1],
                  "x_gaussianized$sparse_indices_1": [0, 1],
              }
          )
  
      self.assertAnalyzeAndTransformResults(
          input_data,
          input_metadata,
          preprocessing_fn,
          expected_data,
          desired_batch_size=20,
          beam_pipeline=beam.Pipeline(),
      )
  
file_path: transform/tensorflow_transform/beam/tukey_hh_params_integration_test.py
imports: import itertools
  import apache_beam
  import numpy
  import tensorflow
  import tensorflow_transform
  from tensorflow_transform.beam import impl
  from tensorflow_transform.beam import impl_test
  from tensorflow_transform.beam import tft_unit
label_desc: Use image node_id 4 for calling the TukeyHHParamsIntegrationTest obj's underlying member method code with example usage: obj.testGaussianizeSparse(input_dtype, elementwise) and returns: dict