GlobalSearchScope () { if (mySdk != null) { VirtualFile libDir = PySearchUtilBase.findLibDir(mySdk); if (libDir != null) { return StreamEx.of(STDLIB_TEST_DIRS) .map(relPath -> libDir.findFileByRelativePath(relPath)) .nonNull() .map(dir -> GlobalSearchScopesCore.directoryScope(myProject, dir, true)) .reduce(GlobalSearchScope.EMPTY_SCOPE, GlobalSearchScope::union); } } return GlobalSearchScope.EMPTY_SCOPE; }