code: private Node replacePatternParamWithTempVar(
        Node function, Node insertSpot, Node patternParam, String tempVarName) {
      // Convert `function f([a, b]) {}` to `function f(tempVar) { var [a, b] = tempVar; }`
      JSType paramType = patternParam.getJSType();
      Node newParam = astFactory.createName(tempVarName, paramType);
      newParam.setJSDocInfo(patternParam.getJSDocInfo());
      patternParam.replaceWith(newParam);
      Node newDecl = IR.var(patternParam, astFactory.createName(tempVarName, paramType));
      function.getLastChild().addChildAfter(newDecl, insertSpot);
      return newDecl;
    }
docs: Replace a destructuring pattern parameter with a a temporary parameter name and add a new
  local variable declaration to the function assigning the temporary parameter to the pattern.
  
  <p> Note: Rewrites of variable declaration destructuring will happen later to rewrite
  this declaration as non-destructured code.
  @param function
  @param insertSpot The local variable declaration will be inserted after this statement.
  @param patternParam
  @param tempVarName the name to use for the temporary variable
  @return the declaration statement that was generated for the local variable