Stop current search path in a DFS

Hi,

I'd like to perform a DFS to find some nodes. However, I only need the first occurrences of these nodes.
To visualize the problem, I have drawn a little example graph: https://i.imgur.com/BgdUzOz.png

The graph is directed but has no further constraints. The search should start at the orange node.
It should reveal the two nearby red nodes but not the red node labeled with "This one not".
Precisely said: It should not reveal a red node that is dominated by another red node.

If I would implement the DFS by myself I just wouldn't follow the outgoing edges of a red node (and stop the search for this path).
However, within graph-tool I have only found a way to stop the _whole_ search with an StopSearch exception.
Is there a way to use graph-tool to perform a search like I have described it?

Kind regards,
Gerion

Sorry for the delay in replying, but I don't see an obvious way to
implement what you want with the current code.