def format_page(self, page, link_resolver, output):
debug('<STR_LIT>' % page.link.ref, '<STR_LIT>')<EOL>if output:<EOL><INDENT>actual_output = os.path.join(output,<EOL>'<STR_LIT:html>')<EOL>if not os.path.exists(actual_output):<EOL><INDENT>os.makedirs(actual_output)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>actual_output = None<EOL><DEDENT>page.format(self.formatter, link_resolver, actual_output)<EOL>
Called by `project.Project.format_page`, to leave full control
to extensions over the formatting of the pages they are
responsible of.

Args:
    page: tree.Page, the page to format.
    link_resolver: links.LinkResolver, object responsible
        for resolving links potentially mentioned in `page`
    output: str, path to the output directory.