def _find_any(self, task_spec):
tasks = []<EOL>if self.task_spec == task_spec:<EOL><INDENT>tasks.append(self)<EOL><DEDENT>for child in self:<EOL><INDENT>if child.task_spec != task_spec:<EOL><INDENT>continue<EOL><DEDENT>tasks.append(child)<EOL><DEDENT>return tasks<EOL>
Returns any descendants that have the given task spec assigned.

:type  task_spec: TaskSpec
:param task_spec: The wanted task spec.
:rtype:  list(Task)
:returns: The tasks objects that are attached to the given task spec.