code: @SuppressWarnings({ "unchecked", "rawtypes" })
  	public <NV> Graph<K, VV, NV> mapEdges(final MapFunction<Edge<K, EV>, NV> mapper) {
  
  		TypeInformation<K> keyType = ((TupleTypeInfo<?>) edges.getType()).getTypeAt(0);
  
  		TypeInformation<NV> valueType;
  
  		if (mapper instanceof ResultTypeQueryable) {
  			valueType = ((ResultTypeQueryable) mapper).getProducedType();
  		} else {
  			valueType = TypeExtractor.createTypeInfo(MapFunction.class, mapper.getClass(), 1, edges.getType(), null);
  		}
  
  		TypeInformation<Edge<K, NV>> returnType = (TypeInformation<Edge<K, NV>>) new TupleTypeInfo(
  				Edge.class, keyType, keyType, valueType);
  
  		return mapEdges(mapper, returnType);
  	}
docs: Apply a function to the attribute of each edge in the graph.
  
  @param mapper the map function to apply.
  @return a new graph