def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def test_ccode_Piecewise():
    p = ccode(Piecewise((x, x < 1), (x**2, True)))
    s = \