input: from typing import List
  
  def extract_reviews(url: str, headers: dict) -> List[dict]:
      """Extract hotel reviews from the given URL using the provided headers.
      The function should return a list of dictionaries, where each dictionary
      represents a review containing the title and the text of the review.
      >>> extract_reviews('<url>', {'User-Agent': 'Mozilla/5.0'})
      [{'title': 'Great Stay', 'text': 'We had a wonderful time.'}, {'title': 'Bad Experience', 'text': 'Service was horrible.'}]
      """
output:     import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url, headers=headers)
      soup = BeautifulSoup(response.content, 'html.parser')
  
      reviews = []
      for review in soup.find_all('div', class_='review'):
          title = review.find('h3', class_='review-title').text.strip()
          text = review.find('p', class_='review-text').text.strip()
          reviews.append({'title': title, 'text': text})
  
      return reviews