input: Write a python function to process form data and fetch search results from an API.
  assert process_form_data('test_query') == expected_results_for_test_query
  assert process_form_data('another_query') == expected_results_for_another_query
  assert process_form_data('') == []
output: def process_form_data(query):
      import requests
  
      if not query:
          return []
  
      api_url = "https://api.example.com/search"
      params = {'query': query}
      response = requests.get(api_url, params=params)
  
      if response.status_code == 200:
          return response.json().get('results', [])
      else:
          return []