code: def test_unary_transformer_transform(self):
      shiftVal = 3
      transformer = (
          MockUnaryTransformer(shiftVal=shiftVal)
          .setInputCol("input")
          .setOutputCol("output")
      )
  
      df = self.spark.range(0, 10).toDF("input")
      df = df.withColumn("input", df.input.cast(dataType="double"))
  
      transformed_df = transformer.transform(df)
      results = transformed_df.select("input", "output").collect()
  
      for res in results:
          self.assertEqual(res.input + shiftVal, res.output)
  
file_path: spark/python/pyspark/ml/tests/test_base.py
imports: import unittest
  from pyspark.sql.types import DoubleType, IntegerType
  from pyspark.testing.mlutils import MockDataset, MockEstimator, MockUnaryTransformer, MockTransformer, SparkSessionTestCase
label_desc: Use image node_id 2 for calling the UnaryTransformerTests obj's underlying member method code with example usage: obj.test_unary_transformer_transform() without return types