code: private VarInfo traverseVar(Var var) {
      checkNotNull(var);
      if (removeLocalVars && var.isArguments()) {
        // If we are considering removing local variables, that includes parameters.
        // If `arguments` is used in a function we must consider all parameters to be referenced.
        Scope functionScope = var.getScope().getClosestHoistScope();
        Node paramList = NodeUtil.getFunctionParameters(functionScope.getRootNode());
        for (Node param = paramList.getFirstChild(); param != null; param = param.getNext()) {
          Node lValue = nameOfParam(param);
          if (lValue == null) {
            continue;
          }
  
          getVarInfo(getVarForNameNode(lValue, functionScope)).markAsReferenced();
        }
        // `arguments` is never removable.
        return canonicalUnremovableVarInfo;
      } else {
        return getVarInfo(var);
      }
    }
docs: Handles a variable reference seen during traversal and returns a {@link VarInfo} object
  appropriate for the given {@link Var}.
  
  <p>This is a wrapper for {@link #getVarInfo} that handles additional logic needed when we're
  getting the {@link VarInfo} during traversal.