GraphFilter
Produces a subset of a module graph for export - the machinery behind the mermaid { } focus/exclude filters that keep a large graph's diagram readable.
Two independent selectors, applied in order:
focus - if any focus glob is given, start from the modules that match and grow outward by up to neighborDepth hops along dependency edges in either direction (dependencies and dependents), so the focused modules keep their immediate context. An empty focus list keeps every module.
exclude - then drop any surviving module matching an exclude glob (e.g.
:test:**).
An edge is kept only when both of its endpoints survive. The result carries the original projectName and metadata. This is a pure function - no Gradle, no I/O - so it is fully unit-tested and reused unchanged by the Mermaid and DOT generators.