code: def subdocuments(self):
      Subdocument = namedtuple(
          "Subdocument", "uri links html text title snippet"
      )
  
      subdocuments = []
      apidocs = self.html.select("dl.function,dl.class,dl.exception")
  
      if apidocs:
          for subdoc in apidocs:
              first_child = subdoc.findChild()
              object_name = first_child.select(".descname")
              title = object_name[0].text
  
              subdocuments.append(
                  Subdocument(
                      uri=self.url + "#" + first_child["id"],
                      links=list(self.extract_links(subdoc)),
                      html=str(subdoc),
                      text=subdoc.text,
                      title=title,
                      snippet=extrat_object_snippet(subdoc),
                  )
              )
  
      else:
          main_container = self.html.select(".main-container")
          suptitle = extract_title(main_container[0])
  
          for subdoc in self.html.select("div.section"):
              for section in subdoc.select("div.section,div#contents"):
                  section.extract()
  
              title = extract_title(subdoc)
  
              if suptitle and suptitle != title:
                  title = suptitle + " / " + title
  
              subdocuments.append(
                  Subdocument(
                      uri=self.url + "#" + subdoc["id"],
                      links=list(self.extract_links(subdoc)),
                      html=str(subdoc),
                      text=subdoc.text,
                      title=title,
                      snippet="",
                  )
              )
  
      if not subdocuments or (len(subdocuments) == 1 and not apidocs):
          subdocumets = [
              Subdocument(
                  uri=self.url,
                  links=self.links(),
                  html=self.raw_html,
                  text=self.text(),
                  title=extract_title(subdoc),
                  snippet="",
              )
          ]
  
      return subdocuments
  
file_path: neupy/site/search-index/htmltools.py
imports: import os
  from collections import namedtuple
  from bs4 import BeautifulSoup
  from six.moves.urllib.parse import urljoin, urlparse
  from webgraph import Link
label_desc: Use image node_id 6 for calling the ParseHTML obj's underlying member method code with example usage: obj.subdocuments() and returns: subdocuments