T (@NotNull H h) { T data = h.getUserData(this); if (data == null) { RecursionGuard.StackStamp stamp = RecursionManager.markStack(); data = myFunction.apply(h); if (stamp.mayCacheNow()) { if (h instanceof UserDataHolderEx) { data = ((UserDataHolderEx)h).putUserDataIfAbsent(this, data); } else { h.putUserData(this, data); } } } return data; }