docs: def get_node_type(self, node, parent=None):
          """If node is a document, the type is page.
          If node is a binder with no parent, the type is book.
          If node is a translucent binder, the type is either chapters (only
          contain pages) or unit (contains at least one translucent binder).
          """
          if isinstance(node, CompositeDocument):
              return 'composite-page'
          elif isinstance(node, (Document, DocumentPointer)):
              return 'page'
          elif isinstance(node, Binder) and parent is None:
              return 'book'
          for child in node:
              if isinstance(child, TranslucentBinder):
                  return 'unit'
          return 'chapter'