<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def normalize_column_names(df):
 r""" Clean up whitespace in column names. See better version at `pugnlp.clean_columns` ['hello_world', 'not_here'] """

    columns = df.columns if hasattr(df, 'columns') else df
    columns = [c.lower().replace(' ', '_') for c in columns]
    return columns