code: public static final Optional<RangeArgs> createFromNode(ForNode node) {
      if (node.getExpr().getRoot() instanceof FunctionNode) {
        FunctionNode fn = (FunctionNode) node.getExpr().getRoot();
        if (fn.getSoyFunction() instanceof RangeFunction) {
          return Optional.of(create(fn.getChildren()));
        }
      }
      return Optional.absent();
    }
docs: Returns a optional {@link RangeArgs} object if the for loop expression is a {@code range(...)}
  expression.