input: Write a function to extract names and their favorite foods from an HTML table.
  assert extract_names_favorite_foods(html) == {'John': 'Pizza', 'James': 'Pancakes', 'Jessica': 'Sushi', 'Tina': 'Tacos', 'David': 'Spaghetti', 'Bob': 'Ramen', 'Caroline': 'Ice Cream', 'Karen': 'Chocolate', 'Edward': 'Burgers', 'Steven': 'Sandwiches'}
  assert extract_names_favorite_foods('<html><body><table><tr><th>Name</th><th>Favorite Food</th></tr><tr><td>Anna</td><td>Pasta</td></tr></table></body></html>') == {'Anna': 'Pasta'}
output: def extract_names_favorite_foods(html):
      from bs4 import BeautifulSoup
  
      soup = BeautifulSoup(html, 'html.parser')
      table = soup.find('table')
      rows = table.find_all('tr')[1:]  # Skip header row
      result = {}
      
      for row in rows:
          columns = row.find_all('td')
          if len(columns) == 2:
              name = columns[0].text.strip()
              favorite_food = columns[1].text.strip()
              result[name] = favorite_food
      
      return result