def preprocess_cell(self, cell, resources, cell_index):
    '\n        Apply a transformation on each code cell. See base.py for details.\n        '
    if (cell.cell_type != 'code'):
        return (cell, resources)
    outputs = self.run_cell(cell)
    cell.outputs = outputs
    if (not self.allow_errors):
        for out in outputs:
            if (out.output_type == 'error'):
                pattern = '                        An error occurred while executing the following cell:\n                        ------------------\n                        {cell.source}\n                        ------------------\n\n                        {out.ename}: {out.evalue}\n                        '
                msg = dedent(pattern).format(out=out, cell=cell)
                raise CellExecutionError(msg)
    return (cell, resources)
Apply a transformation on each code cell. See base.py for details.
def preprocess_cell(self, cell, resources, cell_index):
    '\n        \n        '
    if (cell.cell_type != 'code'):
        return (cell, resources)
    outputs = self.run_cell(cell)
    cell.outputs = outputs
    if (not self.allow_errors):
        for out in outputs:
            if (out.output_type == 'error'):
                pattern = '                        An error occurred while executing the following cell:\n                        ------------------\n                        {cell.source}\n                        ------------------\n\n                        {out.ename}: {out.evalue}\n                        '
                msg = dedent(pattern).format(out=out, cell=cell)
                raise CellExecutionError(msg)
    return (cell, resources)