@SuppressWarnings({ "rawtypes", "unchecked" })
	private static <V> Shape getVertexShapeForEdge(V v, Function<? super V, Shape> vertexShaper) {
		if (vertexShaper instanceof VisualGraphVertexShapeTransformer) {
			if (v instanceof VisualVertex) {
				VisualVertex vv = (VisualVertex) v;

				// Note: it is a bit odd that we 'know' to use the compact shape here for 
				// 		 hit detection, but this is how the edge is painted, so we want the 
				//       view to match the mouse.
				return ((VisualGraphVertexShapeTransformer) vertexShaper).transformToCompactShape(
					vv);
			}
		}
		return vertexShaper.apply(v);
	}
Transforms the given edge loop shape to graph space, which includes updating
the size and location of the loop to be relative to the vertex.

@param edgeLoopShape The shape to transform
@param vertexShape The shape of the vertex for which the edge is being created
@param x The x coordinate of the vertex
@param y The y coordinate of the vertex
@return the transformed edge loop shape
Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/GraphViewerUtils.java