def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def linear_1d(module, grad_input, grad_output):
    """No change made to gradients."""
    return None