def METHOD_NAME(self, pagename, addctx, templatename='page.html',
                outfilename=None, event_arg=None):
    ctx, doc_ctx = self._render_page(pagename, addctx,
                                     templatename, event_arg)
    if not outfilename:
        outfilename = path.join(self.outdir, 'pickles',
                                os_path(pagename) + self.out_suffix)
    ensuredir(path.dirname(outfilename))
    self.dump_context(doc_ctx, outfilename)
    # if there is a source file, copy the source file for the
    # "show source" link
    if ctx.get('sourcename'):
        source_name = path.join(self.staticdir,
                                '_sources',  os_path(ctx['sourcename']))
        ensuredir(path.dirname(source_name))
        copyfile(self.env.doc2path(pagename), source_name)