private static List<KtNamedDeclaration> getAllDeclarations(Collection<KtFile> sourceFiles) {
        return CollectionsKt.filterIsInstance(
                CollectionsKt.flatMap(
                        sourceFiles,
                        KtPsiUtilKt::getFileOrScriptDeclarations
                ),
                KtNamedDeclaration.class
        );
    }
private static List<KtNamedDeclaration> getAllDeclarations(Collection<KtFile> sourceFiles)