code: def clean_categorical_definitions(df, categorical_column):
      sum_of_nan_values = df[categorical_column].isnull().sum().sum()
      if sum_of_nan_values > 0:
          print(
              "Found "
              + str(sum_of_nan_values)
              + " nan values in the categorical_column."
          )
          print(
              'We will default to making these values a string "nan" instead, since that can be used as a key'
          )
          print(
              "If this is not the behavior you want, consider changing these categorical_column values yourself"
          )
  
          df[categorical_column].fillna("nan", inplace=True)
  
      return df
  
file_path: auto_ml/auto_ml/utils_categorical_ensembling.py
imports: import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: clean_categorical_definitions(df, categorical_column) and returns: df