input: Write a python function to perform a Google search and return the first page of results.
  assert 'https://www.google.com/search' in search('cats')['url']
  assert 'https://www.google.com/search' in search('dogs')['url']
  assert 'https://www.google.com/search' in search('python programming')['url']
output: def search(query):
      import requests
      from bs4 import BeautifulSoup
  
      url = f'https://www.google.com/search?q={query}'
      headers = {
          'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
      }
      response = requests.get(url, headers=headers)
      soup = BeautifulSoup(response.text, 'html.parser')
  
      results = []
      for g in soup.find_all('div', class_='tF2Cxc'):
          title = g.find('h3').text
          link = g.find('a')['href']
          description = g.find('span', {'class': 'aCOpRe'}).text
          results.append({
              'title': title,
              'url': link,
              'description': description
          })
  
      return {
          'query': query,
          'results': results,
          'url': url
      }