input: Write a python function to scrape movie titles and ratings from IMDb top chart.
  assert get_movie_titles_and_ratings("https://www.imdb.com/chart/top")[:3] == [("The Shawshank Redemption", 9.3), ("The Godfather", 9.2), ("The Dark Knight", 9.0)]
  assert isinstance(get_movie_titles_and_ratings("https://www.imdb.com/chart/top"), list)
  assert all(isinstance(item, tuple) for item in get_movie_titles_and_ratings("https://www.imdb.com/chart/top"))
output: def get_movie_titles_and_ratings(url):
      import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
  
      movies = []
      for item in soup.select('td.titleColumn'):
          title = item.a.text
          rating = float(item.find_next_sibling('td').strong.text)
          movies.append((title, rating))
  
      return movies