void (Project project, PyFunction function) { if (!FileModificationService.getInstance().preparePsiElementForWrite(function)) return; WriteAction.run(() -> annotateReturnType(project, function, true)); }