input: Write a python function to scrape Wikipedia page of Bill Gates and extract information such as birth date, birth location, education, and alma mater, then save this information into a JSON file.
  assert scrape_wikipedia() == {
   'name': 'Bill Gates',
   'birth': '1955-10-28',
   'birth_location': 'Seattle, Washington, U.S.',
   'education': 'Harvard University (dropped out)',
   'alma_mater': 'Harvard University'
  }
output: def scrape_wikipedia():
      import requests
      from bs4 import BeautifulSoup
      import json
  
      url = "https://en.wikipedia.org/wiki/Bill_Gates"
      response = requests.get(url)
      soup = BeautifulSoup(response.content, "html.parser")
  
      info = {
          "name": "Bill Gates",
          "birth": None,
          "birth_location": None,
          "education": None,
          "alma_mater": None
      }
  
      infobox = soup.find("table", {"class": "infobox vcard"})
      for tr in infobox.find_all("tr"):
          th = tr.find("th")
          td = tr.find("td")
  
          if th and th.text == "Born":
              birth_date = td.find("span", {"class": "bday"}).text
              birth_location = td.find_all("a")[-1].text
              info["birth"] = birth_date
              info["birth_location"] = birth_location
  
          if th and th.text == "Education":
              education = td.text.strip()
              info["education"] = education
  
          if th and th.text == "Alma mater":
              alma_mater = td.text.strip()
              info["alma_mater"] = alma_mater
  
      with open("bill_gates.json", "w") as json_file:
          json.dump(info, json_file)
  
      return info