docs: def get_parent_xpaths_and_textnodes(filename_url_or_filelike,
                                      xpath_to_text=TEXT_FINDER_XPATH):
      """Provided a url, path or filelike obj., we construct an html tree,
      and build a list of parent paths and children textnodes & "feature"
      tuples.
      The features - descriptive values used for gathering statistics that
      attempts to describe this artificial environment I've created (parent
      paths and children textnodes) - are initialized to '0'
  
      Modifications of eatiht.get_sentence_xpath_tuples: some code was
      refactored-out, variable names are slightly different. This function
      does wrap the ltml.tree construction, so a file path, file-like
      structure, or URL is required.
      """
      html_tree = get_html_tree(filename_url_or_filelike)
  
      xpath_finder = html_tree.getroot().getroottree().getpath
  
      nodes_with_text = html_tree.xpath(xpath_to_text)
  
      # read note 5
      parentpaths_textnodes = [
          (xpath_finder(n),
           [n.xpath('.//text()'),   # list of text from textnode
            0,                      # number of texts (cardinality)
            0,                      # total string length in list of texts
            0])                     # average string length
          for n in nodes_with_text
          ]
  
      if len(parentpaths_textnodes) is 0:
          raise Exception("No text nodes satisfied the xpath:\n\n" +
                          xpath_to_text + "\n\nThis can be due to user's" +
                          " custom xpath, min_str_length value, or both")
  
      return parentpaths_textnodes