Main entrypoint method.

        Returns
        -------
        new_nodes : `list`
            Nodes to add to the doctree.

def run(self):
        """Main entrypoint method.

        Returns
        -------
        new_nodes : `list`
            Nodes to add to the doctree.
        """
        self._env = self.state.document.settings.env

        nodes = []

        if 'toctree' in self.options:
            # Insert a hidden toctree
            toctree_node = self._build_toctree()
            nodes.append(toctree_node)

        # Placeholder node rendered in `process_task_topic_list`
        list_node = task_topic_list()
        list_node['types'] = self.types
        list_node['root_namespace'] = self.options['root']
        nodes.append(list_node)

        return nodes