input: Write a function to scrape an online news website to get the headlines. Use the BeautifulSoup library to parse the HTML content of the website. The function should take the URL of the website as an input and return a list of headlines found in the 'h2' tags of the webpage. If no headlines are found, return an empty list.
  import requests
  from bs4 import BeautifulSoup 
  
  assert scrape_headlines("https://www.news.com/")==["Breaking News: Earthquake in California", "Politics: New Election Results", "Technology: AI in Healthcare"]
  assert scrape_headlines("https://www.nonewswebsite.com/")==[]
  assert scrape_headlines("https://www.emptynews.com/")==[]
output: def scrape_headlines(url):
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      headlines = [h2.text for h2 in soup.find_all('h2')]
      return headlines