<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def track_duration(self, key):
 """Context manager that sets a value with the duration of time that it takes to execute whatever it is wrapping. :param str key: The timing name """

        if key not in self.durations:
            self.durations[key] = []
        start_time = time.time()
        try:
            yield
        finally:
            self.durations[key].append(
                max(start_time, time.time()) - start_time)