@NotNull
    static ModalityState modality() {
      ModalityState state = ModalityState.current();
      TransactionGuard.getInstance().assertWriteSafeContext(state);
      return state;
    }
@NotNull
    static ModalityState modality()