input: Write a python function to search Wikipedia articles using an API endpoint.
  assert search_wikipedia('Python')['query']['search'][0]['title']=='Python (programming language)'
  assert search_wikipedia('Flask')['query']['search'][0]['title']=='Flask (web framework)'
  assert search_wikipedia('Machine Learning')['query']['search'][0]['title']=='Machine learning'
output: def search_wikipedia(query):
      import requests
      url = "https://en.wikipedia.org/w/api.php"
      params = {
          "action": "query",
          "list": "search",
          "srsearch": query,
          "format": "json"
      }
      response = requests.get(url, params=params)
      return response.json()