<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 _end_clean(self):
 """ Must be called when the agent is closing """

        await self._timeout_watcher.clean()

        async def close_and_delete(container_id):
            try:
                await self._docker.remove_container(container_id)
            except:
                pass

        for container_id  in self._containers_running:
            await close_and_delete(container_id)
        for container_id  in self._student_containers_running:
            await close_and_delete(container_id)