def _doObtain(self, retriever, path, reasonsWhyNot):
        if path is None:
            # Special case: we only get a self->self link if we are the
            # beginning _and_ the end.
            path = Path(links=[])
            selfLink = Link(source=self, target=self)
            self._annotateOneLink(selfLink)
            finalPath = path.to(selfLink)
        else:
            finalPath = Path(links=path.links[:])
            self._annotateOneLink(finalPath.links[-1])

        result = retriever.retrieve(finalPath)
        objections = set(retriever.objectionsTo(finalPath, result))
        reasonsWhyNot |= objections
        if result is not None:
            if not objections:
                yield result

        for link in self._applyAnnotators(self._allLinks()):
            subpath = path.to(link)
            if subpath.isCyclic():
                continue
            if retriever.shouldKeepGoing(subpath):
                for obtained in link.target._doObtain(retriever, subpath, reasonsWhyNot):
                    yield obtained
Boolean flagging units as army units.
dataset/ETHPy150Open twisted/imaginary/imaginary/idea.py/Idea._doObtain--crossover with--dataset/ETHPy150Open GraylinKim/sc2reader/sc2reader/data/__init__.py/Unit.is_army