Set<FutureFeature> (@NotNull PyFile file) { EnumSet<FutureFeature> result = EnumSet.noneOf(FutureFeature.class); for (FutureFeature feature: FutureFeature.values()) { if (file.hasImportFromFuture(feature)) { result.add(feature); } } return result; }