input: Write a function that takes a URL and headers as input and returns a list of dictionaries containing hotel reviews extracted from TripAdvisor using web scraping techniques. Each dictionary should include the title and text of the review. Use BeautifulSoup for parsing the HTML.
  
  
  def scrape_hotel_reviews(url, headers):
      response = requests.get(url, headers=headers)
      soup = BeautifulSoup(response.text, 'html.parser')
      reviews = []
  
      for review in soup.find_all('div', {'class': 'review-container'}):
          title = review.find('span', {'class': 'noQuotes'}).text
          text = review.find('p', {'class': 'partial_entry'}).text
          reviews.append({'title': title, 'text': text})
  
      return reviews
  
  # Example usage:
  url = 'https://www.tripadvisor.com/Hotel_Review-g60763-d122043-Reviews-The_Ritz_Carlton_New_York_Central_Park-New_York_City_New_York.html'
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'}
  
  result = scrape_hotel_reviews(url, headers)
  for review in result:
      print(review)
  
  assert isinstance(result, list)
  assert all(isinstance(review, dict) for review in result)
  assert all('title' in review and 'text' in review for review in result)
  
output: def scrape_hotel_reviews(url, headers):
      response = requests.get(url, headers=headers)
      soup = BeautifulSoup(response.text, 'html.parser')
      reviews = []
  
      for review in soup.find_all('div', {'class': 'review-container'}):
          title = review.find('span', {'class': 'noQuotes'}).text
          text = review.find('p', {'class': 'partial_entry'}).text
          reviews.append({'title': title, 'text': text})
  
      return reviews