input: Write a function to perform a Google search using the requests library and return the titles and URLs of the search results.
  assert google_search('python programming') == [('Title 1', 'URL 1'), ('Title 2', 'URL 2')]
  assert google_search('openai') == [('Title 1', 'URL 1'), ('Title 2', 'URL 2')]
  assert google_search('weather today') == [('Title 1', 'URL 1'), ('Title 2', 'URL 2')]
output: def google_search(query):
      import requests
      from bs4 import BeautifulSoup
      
      headers = {
          'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
      
      response = requests.get(f'https://www.google.com/search?q={query}', headers=headers)
      soup = BeautifulSoup(response.text, 'html.parser')
      
      search_results = []
      for g in soup.find_all('div', class_='BNeawe vvjwJb AP7Wnd'):
          title = g.get_text()
          parent = g.find_parent('a')
          if parent:
              url = parent['href']
              search_results.append((title, url))
      
      return search_results