code: public <T> DataSet<T> groupReduceOnEdges(EdgesFunction<K, EV, T> edgesFunction,
  			EdgeDirection direction) throws IllegalArgumentException {
  
  		TypeInformation<K> keyType = ((TupleTypeInfo<?>) vertices.getType()).getTypeAt(0);
  		TypeInformation<EV> edgeValueType = ((TupleTypeInfo<?>) edges.getType()).getTypeAt(2);
  		TypeInformation<T> returnType = TypeExtractor.createTypeInfo(EdgesFunction.class, edgesFunction.getClass(), 2,
  			keyType, edgeValueType);
  
  		return groupReduceOnEdges(edgesFunction, direction, returnType);
  	}
docs: Groups by vertex and computes a GroupReduce transformation over the edge values of each vertex.
  The edgesFunction applied on the edges only has access to the vertex id (not the vertex value)
  of the grouping vertex.
  
  <p>For each vertex, the edgesFunction can iterate over all edges of this vertex
  with the specified direction, and emit any number of output elements, including none.
  
  @param edgesFunction the group reduce function to apply to the neighboring edges of each vertex.
  @param direction the edge direction (in-, out-, all-).
  @param <T> the output type
  @return a DataSet containing elements of type T
  @throws IllegalArgumentException