code: @SuppressWarnings("unchecked")
  	public static <K, OLD, NEW> DataSet<Edge<K, NEW>> translateEdgeValues(DataSet<Edge<K, OLD>> edges, TranslateFunction<OLD, NEW> translator, int parallelism) {
  		Preconditions.checkNotNull(edges);
  		Preconditions.checkNotNull(translator);
  
  		Class<Edge<K, NEW>> edgeClass = (Class<Edge<K, NEW>>) (Class<? extends Edge>) Edge.class;
  		TypeInformation<K> idType = ((TupleTypeInfo<Edge<K, OLD>>) edges.getType()).getTypeAt(0);
  		TypeInformation<OLD> oldType = ((TupleTypeInfo<Edge<K, OLD>>) edges.getType()).getTypeAt(2);
  		TypeInformation<NEW> newType = TypeExtractor.getUnaryOperatorReturnType(
  			translator,
  			TranslateFunction.class,
  			0,
  			1,
  			new int[]{1},
  			oldType,
  			null,
  			false);
  
  		TupleTypeInfo<Edge<K, NEW>> returnType = new TupleTypeInfo<>(edgeClass, idType, idType, newType);
  
  		return edges
  			.map(new TranslateEdgeValue<>(translator))
  			.returns(returnType)
  				.setParallelism(parallelism)
  				.name("Translate edge values");
  	}
docs: Translate {@link Edge} values using the given {@link TranslateFunction}.
  
  @param edges input edges
  @param translator implements conversion from {@code OLD} to {@code NEW}
  @param parallelism operator parallelism
  @param <K> vertex ID type
  @param <OLD> old edge value type
  @param <NEW> new edge value type
  @return translated edges