<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close_children_tasks(self, parent_task_name):
 """ Closes all the children tasks that were open Args: parent_task_name (str):
 Name of the parent task Returns: None """

        if parent_task_name not in self.tasks:
            return

        while self.tasks:
            next_task = reversed(self.tasks.keys()).next()
            if next_task == parent_task_name:
                break
            del self.tasks[next_task]