boolean (FutureFeature feature) { if (getGreenStub() instanceof PyFileStub stub) { return stub.getFutureFeatures().get(feature.ordinal()); } Boolean enabled = myFutureFeatures.get(feature); if (enabled == null) { enabled = calculateImportFromFuture(feature); myFutureFeatures.put(feature, enabled); // NOTE: ^^^ not synchronized. if two threads will try to modify this, both can only be expected to set the same value. } return enabled; }