'Utility: Render a lone doctree node.'

def render_partial(self, node):

    if (node is None):
        return {'fragment': ''}
    doc = new_document('<partial    node>')
    doc.append(node)
    if (self._publisher is None):
        self._publisher = Publisher(source_class=DocTreeInput, destination_class=StringOutput)
        self._publisher.set_components('standalone', 'restructuredtext', 'pseudoxml')
    pub = self._publisher
    pub.reader = DoctreeReader()
    pub.writer = HTMLWriter(self)
    pub.process_programmatic_settings(None, {'output_encoding': 'unicode'}, None)
    pub.set_source(doc, None)
    pub.set_destination(None, None)
    pub.publish()
    return pub.writer.parts
