DependencyScope (@NotNull Library library) { if (!(library instanceof LibraryEx libraryEx)) { return null; } LibraryProperties<?> libraryProperties = libraryEx.getProperties(); if (!(libraryProperties instanceof RepositoryLibraryProperties repositoryLibraryProperties)) { return null; } RepositoryLibraryDescription libraryDescription = RepositoryLibraryDescription.findDescription(repositoryLibraryProperties); return libraryDescription.getSuggestedScope(); }