def METHOD_NAME(self):
    """
    Internal method to update the next deadline of this task based on the period and the current time.
    """
    if not self.deadline:
        raise ValueError("Deadline was not initialized")
    if self.fixed_rate:
        self.deadline = self.deadline + self.period
    else:
        self.deadline = time.time() + self.period