code: function attachForEachNeighbor(Class, description) {
    const {
      name,
      type,
      direction
    } = description;
  
    const forEachName = 'forEach' + name[0].toUpperCase() + name.slice(1, -1);
  
    /**
     * Function iterating over all the relevant neighbors using a callback.
     *
     * @param  {any}      node     - Target node.
     * @param  {function} callback - Callback to use.
     * @return {undefined}
     *
     * @throws {Error} - Will throw if there are too many arguments.
     */
    Class.prototype[forEachName] = function(node, callback) {
  
      // Early termination
      if (type !== 'mixed' && this.type !== 'mixed' && type !== this.type)
        return;
  
      node = '' + node;
  
      const nodeData = this._nodes.get(node);
  
      if (typeof nodeData === 'undefined')
        throw new NotFoundGraphError(`Graph.${forEachName}: could not find the "${node}" node in the graph.`);
  
      // Here, we want to iterate over a node's relevant neighbors
      forEachNeighborForNode(
        type === 'mixed' ? this.type : type,
        direction,
        nodeData,
        callback
      );
    };
  }
docs: Function attaching a neighbors callback iterator method to the Graph prototype.
  
  @param {function} Class       - Target class.
  @param {object}   description - Method description.