private Map<E, Set<V>> getOccludedEdges(Collection<E> edgeCollection) {

		Layout<V, E> layout = viewer.getGraphLayout();
		Graph<V, E> graph = layout.getGraph();

		Set<V> prototype = new HashSet<>();
		Factory<Set<V>> factory = FactoryUtils.prototypeFactory(prototype);
		Map<E, Set<V>> map = MapUtils.lazyMap(new HashMap<E, Set<V>>(), factory);

		Map<V, Rectangle> vertexBoundsMap = getVertexBounds();
		Set<Entry<V, Rectangle>> entrySet = vertexBoundsMap.entrySet();
		for (Entry<V, Rectangle> entry : entrySet) {
			V v = entry.getKey();
			Rectangle vertexBounds = getVertexBoundsInGraphSpace(viewer, v);

			for (E edge : edgeCollection) {
				Shape edgeShape = getEdgeShapeInGraphSpace(viewer, edge);
				Pair<V> endpoints = graph.getEndpoints(edge);
				if (v == endpoints.getFirst() || v == endpoints.getSecond()) {
					// do we ever care if an edge is occluded by its own vertices?
					continue;
				}

				if (edgeShape.intersects(vertexBounds)) {
					Set<V> set = map.get(edge);
					set.add(v);
				}
			}
		}

		return map;
	}
Returns a mapping edges to vertices that touch them.

@param edgeCollection the edges to check for occlusion
@return a mapping of occluded edges (a subset of the provided edges) to those vertices that
        occlude them.
Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/edge/routing/ArticulatedEdgeRouter.java