def prune_dependency_tree(self):
closure = set()<EOL>working_set = set(self.initialnames)<EOL>while working_set:<EOL><INDENT>argname = working_set.pop()<EOL>if argname not in closure and argname in self.names_closure:<EOL><INDENT>closure.add(argname)<EOL>if argname in self.name2fixturedefs:<EOL><INDENT>working_set.update(self.name2fixturedefs[argname][-<NUM_LIT:1>].argnames)<EOL><DEDENT><DEDENT><DEDENT>self.names_closure[:] = sorted(closure, key=self.names_closure.index)<EOL>
Recompute names_closure from initialnames and name2fixturedefs

        Can only reduce names_closure, which means that the new closure will
        always be a subset of the old one. The order is preserved.

        This method is needed because direct parametrization may shadow some
        of the fixtures that were included in the originally built dependency
        tree. In this way the dependency tree can get pruned, and the closure
        of argnames may get reduced.