code: function forEachForKey(object, k, callback) {
  
    if (!(k in object))
      return;
  
    if (object[k] instanceof Set)
      object[k].forEach(edgeData => callback(
        edgeData.key,
        edgeData.attributes,
        edgeData.source.key,
        edgeData.target.key,
        edgeData.source.attributes,
        edgeData.target.attributes
      ));
    else {
      const edgeData = object[k];
  
      callback(
        edgeData.key,
        edgeData.attributes,
        edgeData.source.key,
        edgeData.target.key,
        edgeData.source.attributes,
        edgeData.target.attributes
      );
    }
  
    return;
  }
docs: Function iterating over the egdes from the object at given key using
  a callback.
  
  @param {object}   object   - Target object.
  @param {mixed}    k        - Neighbor key.
  @param {function} callback - Callback to use.