input: Write a python function to get the titles and release years of movies from IMDb's most popular movies page and return them as a list of dictionaries.
  assert get_movie_data() != []  # Ensure that the function returns non-empty data
  assert isinstance(get_movie_data(), list)  # Ensure the function returns a list
  assert all(isinstance(movie, dict) for movie in get_movie_data())  # Ensure all items in the list are dictionaries
  assert 'title' in get_movie_data()[0] and 'year' in get_movie_data()[0]  # Ensure each dictionary has 'title' and 'year' keys
output: import requests
  from bs4 import BeautifulSoup
  
  def get_movie_data():
      url = 'https://www.imdb.com/chart/moviemeter/'
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
  
      movies = []
      for item in soup.select('td.titleColumn'):
          title = item.a.text
          year = item.span.text.strip('()')
          movies.append({'title': title, 'year': year})
  
      return movies