input: Write a python function to fetch weather data for a given city using the OpenWeatherMap API.
  assert fetch_weather('London', '<your_api_key>') is not None
  assert fetch_weather('New York', '<your_api_key>') is not None
  assert 'weather' in fetch_weather('Tokyo', '<your_api_key>')
output: import requests
  
  def fetch_weather(city, api_key):
      base_url = "http://api.openweathermap.org/data/2.5/weather"
      params = {
          'q': city,
          'appid': api_key
      }
      response = requests.get(base_url, params=params)
      if response.status_code == 200:
          return response.json()
      else:
          return None