input: Write a python function to scrape titles from a web page using BeautifulSoup.
  assert scrape_titles('http://example.com') == ['Example Domain']
  assert scrape_titles('http://test.com') == ['Test Title 1', 'Test Title 2']
  assert scrape_titles('http://notarealwebsite.com') == []
output: def scrape_titles(url):
      import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      titles = [title.get_text() for title in soup.find_all('title')]
      
      return titles