<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def stop(self):
 """ Stop discarding media. """

        for task in self.__tracks.values():
            if task is not None:
                task.cancel()
        self.__tracks = {}