def METHOD_NAME(self):
    """
    Converting all cells of the ipynb as the body of the sagews document.
    see http://nbformat.readthedocs.io/en/latest/format_description.html
    """
    for cell in self.nb.cells:
        ct = cell['cell_type']
        source = cell.get('source', None)
        outputs = cell.get('outputs', [])
        if ct == 'markdown':
            self.write(SagewsCell(md=source).convert())
        elif ct == 'code':
            self.write(SagewsCell(input=source, outputs=outputs).convert())
        elif ct == 'raw':
            self.write(SagewsCell(input=source).convert())
        else:
            print("ERROR: cell type '%s' not recognized:\n%s" %
                  (ct, json.dumps(cell, indent=2)))