<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop_all_periodic_tasks(self, remove_tasks=True):
 """Stop sending any messages that were started using bus.send_periodic :param bool remove_tasks: Stop tracking the stopped tasks. """

        for task in self._periodic_tasks:
            task.stop(remove_task=remove_tasks)