code: def test_transform_with_lambda(spark):
      data = [("jose", 1), ("li", 2), ("liz", 3)]
      source_df = spark.createDataFrame(data, ["name", "age"])
      actual_df = source_df.transform(
          lambda df: df.withColumn("age_times_two", col("age") * 2)
      )
      expected_data = [("jose", 1, 2), ("li", 2, 4), ("liz", 3, 6)]
      expected_df = spark.createDataFrame(
          expected_data, ["name", "age", "age_times_two"]
      )
      chispa.assert_df_equality(actual_df, expected_df)
  
file_path: quinn/tests/extensions/test_dataframe_ext.py
imports: from functools import partial
  import chispa
  from pyspark.sql.functions import col
  from tests.conftest import auto_inject_fixtures
  from .dataframe_transformations import with_greeting, with_something, with_funny, with_jacket
label_desc: Use image node_id 2 for calling a global function with example usage: test_transform_with_lambda(spark) without return types