public PsiReturnStatement createReturnInLastStatement() throws IncorrectOperationException {
    ThrowableComputable<PsiReturnStatement, RuntimeException> action = () -> {
      PsiCodeBlock body = myMethod.getBody();
      PsiJavaToken rBrace = body.getRBrace();
      if (rBrace == null) return null;
      final String value = generateValue(rBrace);
      PsiReturnStatement returnStatement = (PsiReturnStatement)myFactory.createStatementFromText("return " + value + ";", myMethod);
      return (PsiReturnStatement)body.addBefore(returnStatement, rBrace);
    };
    return myMethod.isPhysical() ? WriteAction.compute(action) : action.compute();
  }
public PsiReturnStatement createReturnInLastStatement()