def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def start(self, action_name: str) -> None:
        """Defines how to start recording an action."""