<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def complete_task(self, task):
 """Complete logging of a task Returns the time lapsed since `start_task` was called Parameters task : str Name of the task to be started Returns ------- time : float The time lapsed between task start and completion """

        try:
            runtime = self.timer() - self.tasks[task]
            del self.tasks[task]
            if runtime >= self.min_runtime:
                self.info("Calculated {} in {:.2f} seconds.".format(
                    task, runtime))
            return runtime
        except KeyError:
            self.info("Calculated {}.".format(task))