input: Write a python function to extract all text from an HTML document using BeautifulSoup.
  assert extract_text('<div><p>This is some text.</p><p>This is another text.</p><div><span>Some more text.</span></div></div>') == "This is some text.\nThis is another text.\nSome more text."
  assert extract_text('<html><body><h1>Title</h1><p>Paragraph.</p></body></html>') == "Title\nParagraph."
  assert extract_text('<div><p>First text.</p><p>Second text.</p></div>') == "First text.\nSecond text."
output: def extract_text(html_doc):
      from bs4 import BeautifulSoup
      
      soup = BeautifulSoup(html_doc, 'html.parser')
      texts = soup.stripped_strings
      return "\n".join(texts)