If I have a Django model with a property defined as
def __task_state(self): if self.task_id is None: return None else: return # Calculate