input: Write a python function to fetch the title and main content of a Wikipedia page given a query string.
  assert fetch_wikipedia_content('Machine learning')['title'] == 'Machine learning - Wikipedia'
  assert fetch_wikipedia_content('Machine learning')['main_content'] is not None
  assert 'Machine learning' in fetch_wikipedia_content('Machine learning')['main_content']
output: def fetch_wikipedia_content(query):
      import requests
      from bs4 import BeautifulSoup
  
      base_url = "https://en.wikipedia.org/wiki/"
      url = base_url + query.replace(' ', '_')
  
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
  
      title = soup.find('h1', {'id': 'firstHeading'}).text
      main_content = soup.find('div', {'class': 'mw-parser-output'}).get_text()
  
      return {'title': title, 'main_content': main_content}