input: Write a python function to transform a DataFrame by adding an 'age_group' column based on the 'age' column.
  assert transform_dataframe(pd.DataFrame({'age': [15, 22, 37]})).equals(pd.DataFrame({'age': [15, 22, 37], 'age_group': ['under 20', '20-35', 'over 35']}))
  assert transform_dataframe(pd.DataFrame({'age': [19, 20, 34, 35, 50]})).equals(pd.DataFrame({'age': [19, 20, 34, 35, 50], 'age_group': ['under 20', '20-35', '20-35', 'over 35', 'over 35']}))
  assert transform_dataframe(pd.DataFrame({'age': [5, 18, 28, 45]})).equals(pd.DataFrame({'age': [5, 18, 28, 45], 'age_group': ['under 20', 'under 20', '20-35', 'over 35']}))
output: import pandas as pd
  
  def transform_dataframe(df):
      def age_group(age):
          if age < 20:
              return 'under 20'
          elif 20 <= age <= 35:
              return '20-35'
          else:
              return 'over 35'
      
      df['age_group'] = df['age'].apply(age_group)
      return df