code: def get_tasks(self, state=Task.ANY_MASK):
          
          return [t for t in Task.Iterator(self.task_tree, state)]
docs: Returns a list of Task objects with the given state.
  
          :type  state: integer
          :param state: A bitmask of states.
          :rtype:  list[Task]
          :returns: A list of tasks.