def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def implementor(rpc_code, blocking=False):
    """
    RPC implementation function.
    """
    return partial(_add_implementor, rpc_code, blocking)