def METHOD_NAME(self, submission: int, render_mode: str, as_html=False):
    renderer = Renderer(submission=submission, mode=render_mode, as_html=as_html)
    self.stdout.write("")
    self.stdout.write(f"Submission {submission.id} - ", ending="")
    prev_node_type, tabulate_data = None, []
    for node in renderer:
        lead = get_indent_level(node)
        if isinstance(node, ComponentNode):
            # do not emit empty lines
            if not node.label and not node.display_value:
                continue
            # extract label + value for tabulate data
            tabulate_data.append([node.label, node.display_value])
            prev_node_type = ComponentNode
            continue
        elif isinstance(node, SubmissionValueVariableNode):
            tabulate_data.append([node.label, node.display_value])
            prev_node_type = SubmissionValueVariableNode
            continue
        elif prev_node_type == ComponentNode and (
            isinstance(node, SubmissionStepNode) or isinstance(node, VariablesNode)
        ):
            self._print_tabulate_data(tabulate_data)
            tabulate_data = []
        if lead:
            self.stdout.write(lead, ending="")
        self.stdout.write(node.render())
        prev_node_type = type(node)
    self._print_tabulate_data(tabulate_data)