code: @SuppressWarnings("unchecked")
  	public PythonSingleOutputStreamOperator reduce(ReduceFunction<PyObject> fun) throws IOException {
  		return new PythonSingleOutputStreamOperator(stream.reduce(new PythonReduceFunction(fun)));
  	}
docs: A thin wrapper layer over {@link WindowedStream#reduce(org.apache.flink.api.common.functions.ReduceFunction)}.
  
  @param fun The reduce function.
  @return The data stream that is the result of applying the reduce function to the window.