def transform_context(self, context, builder):
    child_of_root = builder.tree
    if (builder.tree['node_type'] == REGTEXT):
        child_of_root = {'node_type': EMPTYPART, 'children': [builder.tree]}
    context['markup_page_type'] = 'reg-section'
    context['tree'] = {'children': [child_of_root]}
    context['navigation'] = self.section_navigation(context['label_id'], context['version'])
    return context
def transform_context(self, context, builder):
    child_of_root = builder.tree
    if (builder.tree['node_type'] == REGTEXT):
        child_of_root = {'node_type': EMPTYPART, 'children': [builder.tree]}
    context['markup_page_type'] = 'reg-section'
    context['tree'] = {'children': [child_of_root]}
    context['navigation'] = self.section_navigation(context['label_id'], context['version'])
    return context