docs: def _build_toctree_node(parent=None, entries=None, includefiles=None,
                          caption=None):
      """Factory for a toctree node.
      """
      # Add the toctree's node itself
      subnode = sphinx.addnodes.toctree()
      subnode['parent'] = parent
      subnode['entries'] = entries
      subnode['includefiles'] = includefiles
      subnode['caption'] = caption
      # These values are needed for toctree node types. We don't need/want
      # these to be configurable for module-toctree.
      subnode['maxdepth'] = 1
      subnode['hidden'] = False
      subnode['glob'] = None
      subnode['hidden'] = False
      subnode['includehidden'] = False
      subnode['numbered'] = 0
      subnode['titlesonly'] = False
      return subnode