docs: def extract(url_or_htmlstring, xpath_to_text=TEXT_FINDER_XPATH):
      """
      Wrapper function for extracting the main article from html document.
  
      A crappy flowchart/state-diagram:
      start: url[,xpath] -> xpaths of text-nodes -> frequency distribution
      -> argmax( freq. dist. ) = likely xpath leading to article's content
      """
      sent_xpath_pairs = get_sentence_xpath_tuples(url_or_htmlstring, xpath_to_text)
  
      hist = get_xpath_frequencydistribution(
          [x for (s, x) in sent_xpath_pairs])
  
      max_path = hist[0]
  
      article_text = ' '.join([s for (s, x) in sent_xpath_pairs
                               if max_path[0] in x])
  
      # starting from index 2 because of the two extra newlines in front
      return article_text[2:]