input: Write a python function to classify an email based on its subject and body.
  assert classify_email('Your order has been shipped', 'Your order is on the way!')==['PURCHASE']
  assert classify_email('***SPAM*** Win a free iPhone', 'Congratulations! You have been selected.')==['SPAM']
  assert classify_email('Hello', 'This is a test email with no keywords.')==[]
  assert classify_email('Hello', 'This is a limited time offer!')==['MARKETING']
  assert classify_email('Hello', 'You are an idiot')==['OFFENSIVE']
output: def classify_email(subject, body):
      categories = {
          'PURCHASE': ['order', 'shipped', 'purchase', 'delivery'],
          'SPAM': ['free', 'win', 'offer', 'selected'],
          'MARKETING': ['limited time', 'sale', 'discount', 'offer'],
          'OFFENSIVE': ['idiot', 'stupid', 'dumb']
      }
      
      classified_categories = []
  
      content = (subject + ' ' + body).lower()
  
      for category, keywords in categories.items():
          for keyword in keywords:
              if keyword in content:
                  classified_categories.append(category)
                  break
  
      return classified_categories