public boolean isRecursive(ToShapeId shape) {
        return !getRecursiveClosure(shape).isEmpty();
    }
Checks if the given shape has edges with recursive references.

@param shape Shape to check.
@return True if the shape has recursive edges.
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/TopologicalIndex.java