code: def pd_to_spark_clean(pdf):
      steps = [
          replace_tuple_columns,
          replace_nan_with_None,
          replace_categorical_columns,
      ]
      intermediate_df = pdf
      for f in steps:
          intermediate_df = f(intermediate_df)
  
      return intermediate_df
  
imports: import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: pd_to_spark_clean(pdf) and returns: intermediate_df