def process_output(self, nodes):
    '\n        '
    mode = self.interp.conf.args.mode
    if (mode == 'original'):
        clean_lines = []
        for ln in nodes:
            if (ln.endswith(b'--EOB') or ln.endswith(b'--VAL') or ln.endswith(b'--CLS')):
                pass
            elif ln.endswith(b'--CMD'):
                clean_lines.append(ln[:(- 5)])
            else:
                clean_lines.append(ln)
        return (None, b'\n'.join(clean_lines).decode())
    elif self.interp.debug:
        return nodes
    elif (mode == 'default'):
        lines = [ln.decode() for node in nodes for part in node[1:] for ln in part]
        return (None, '\n'.join(lines))
    stdout = '\n'.join([ln.decode() for node in nodes for ln in node[1]])
    if (mode == 'texmacs'):
        value_lines = nodes[(- 1)][2]
        if value_lines:
            dirty = '\n'.join([ln.decode() for ln in value_lines])
            clean = (dirty[6:] + '\n</math>')
            return ({'text/html': clean}, stdout)
    elif (mode == 'pretty'):
        margin = (len(str(nodes[(- 1)][0])) + 4)
        textval = '\n'.join([ln[margin:].decode() for ln in nodes[(- 1)][2]])
        textcls = '\n'.join([ln[margin:].decode() for ln in nodes[(- 1)][3]])
        html = '<pre>{}</pre><pre style="color: gray">{}</pre>'.format(textval, textcls)
        return ({'text/html': html}, stdout)
    return (None, stdout)
def process_output(self, nodes):
    '\n        '
    mode = self.interp.conf.args.mode
    if (mode == 'original'):
        clean_lines = []
        for ln in nodes:
            if (ln.endswith(b'--EOB') or ln.endswith(b'--VAL') or ln.endswith(b'--CLS')):
                pass
            elif ln.endswith(b'--CMD'):
                clean_lines.append(ln[:(- 5)])
            else:
                clean_lines.append(ln)
        return (None, b'\n'.join(clean_lines).decode())
    elif self.interp.debug:
        return nodes
    elif (mode == 'default'):
        lines = [ln.decode() for node in nodes for part in node[1:] for ln in part]
        return (None, '\n'.join(lines))
    stdout = '\n'.join([ln.decode() for node in nodes for ln in node[1]])
    if (mode == 'texmacs'):
        value_lines = nodes[(- 1)][2]
        if value_lines:
            dirty = '\n'.join([ln.decode() for ln in value_lines])
            clean = (dirty[6:] + '\n</math>')
            return ({'text/html': clean}, stdout)
    elif (mode == 'pretty'):
        margin = (len(str(nodes[(- 1)][0])) + 4)
        textval = '\n'.join([ln[margin:].decode() for ln in nodes[(- 1)][2]])
        textcls = '\n'.join([ln[margin:].decode() for ln in nodes[(- 1)][3]])
        html = '<pre>{}</pre><pre style="color: gray">{}</pre>'.format(textval, textcls)
        return ({'text/html': html}, stdout)
    return (None, stdout)