List<LanguageLevel> (@NotNull LanguageLevel version) { final List<LanguageLevel> result = new ArrayList<>(); final LanguageLevel latest = LanguageLevel.getLatest(); for (LanguageLevel level : PyCompatibilityInspection.SUPPORTED_LEVELS) { if (version.isOlderThan(level) && latest.isAtLeast(level)) { result.add(level); } } return result; }