code: public static <I, O> ListenableFuture<O> transform(ListenableFuture<I> input,
        final Function<? super I, ? extends O> function, Executor executor) {
      checkNotNull(function);
      return transform(input, asAsyncFunction(function), executor);
    }
docs: Returns a new {@code ListenableFuture} whose result is the product of
  applying the given {@code Function} to the result of the given {@code
  Future}. Example:
  
  <pre>   {@code
  ListenableFuture<QueryResult> queryFuture = ...;
  Function<QueryResult, List<Row>> rowsFunction =
  new Function<QueryResult, List<Row>>() {
  public List<Row> apply(QueryResult queryResult) {
  return queryResult.getRows();
  }
  };
  ListenableFuture<List<Row>> rowsFuture =
  transform(queryFuture, rowsFunction, executor);}</pre>
  
  <p>The returned {@code Future} attempts to keep its cancellation state in
  sync with that of the input future. That is, if the returned {@code Future}
  is cancelled, it will attempt to cancel the input, and if the input is
  cancelled, the returned {@code Future} will receive a callback in which it
  will attempt to cancel itself.
  
  <p>An example use of this method is to convert a serializable object
  returned from an RPC into a POJO.
  
  <p>When the transformation is fast and lightweight, consider {@linkplain
  #transform(ListenableFuture, Function) omitting the executor} or
  explicitly specifying {@code directExecutor}. However, be aware of the
  caveats documented in the link above.
  
  @param input The future to transform
  @param function A Function to transform the results of the provided future
  to the results of the returned future.
  @param executor Executor to run the function in.
  @return A future that holds result of the transformation.
  @since 9.0 (in 2.0 as {@code compose})