code: public static Stream<Statement> encode(final Stream<? extends Outcome> stream) {
          Preconditions.checkNotNull(stream);
          return Record.encode(stream.transform(new Function<Outcome, Record>() {
  
              @Override
              public Record apply(final Outcome outcome) {
                  return outcome.toRecord();
              }
  
          }, 0), ImmutableSet.of(KSR.INVOCATION));
      }
docs: Performs outcome-to-RDF encoding by converting a stream of outcomes in a stream of RDF
  statements.
  
  @param stream
  the stream of outcomes to encode.
  @return the resulting stream of statements