code: private static void convertLastReturnToStatement(
        Node block, String resultName) {
      Node ret = block.getLastChild();
      checkArgument(ret.isReturn());
      Node resultNode = getReplacementReturnStatement(ret, resultName);
  
      if (resultNode == null) {
        block.removeChild(ret);
      } else {
        resultNode.useSourceInfoIfMissingFromForTree(ret);
        block.replaceChild(ret, resultNode);
      }
    }
docs: Replace the 'return' statement with its child expression.
  "return foo()" becomes "foo()" or "resultName = foo()"
  "return" is removed or becomes "resultName = void 0".
  
  @param block
  @param resultName