input: Write a python function to get weather data for a list of cities using an API key.
  assert len(get_weather_data(["New York", "London"], "YOUR_API_KEY")) == 2
  assert isinstance(get_weather_data(["Tokyo"], "YOUR_API_KEY")[0], dict)
  assert "weather" in get_weather_data(["Mumbai"], "YOUR_API_KEY")[0]
output: import requests
  
  def get_weather_data(cities, api_key):
      base_url = "http://api.openweathermap.org/data/2.5/weather"
      weather_data = []
      
      for city in cities:
          params = {
              'q': city,
              'appid': api_key
          }
          response = requests.get(base_url, params=params)
          if response.status_code == 200:
              weather_data.append(response.json())
          else:
              weather_data.append({})
      
      return weather_data