def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def test_ccode_functions():
    assert ccode(sin(x) ** cos(x)) == "pow(sin(x), cos(x))"