input: from typing import List
  
  def html_to_text(html_string: str) -> str:
      """ Converts given HTML string to plain text by stripping out HTML tags and keeping 
      only the textual content.
      >>> html_to_text('<h1>Hello, World!</h1>')
      'Hello, World!'
      >>> html_to_text('<p>This is a paragraph.<br>And this is a new line.</p>')
      'This is a paragraph. And this is a new line.'
      """
output:     import re
      text = re.sub(r'<[^>]+>', '', html_string)
      text = re.sub(r'\s+', ' ', text).strip()
      return text