getAdjacencyList(groupBy, opts = {}) {

    $tm.start('Creating adjacency list');

    if (!opts.edges) {
      const tRefs = utils.getMatches(env.selector.allPotentialNodes);
      opts.edges = this.getEdgesForSet(tRefs, opts.toWL, opts.typeWL);
    }

    const adjList = utils.groupByProperty(opts.edges, groupBy || 'to');

    $tm.stop('Creating adjacency list');

    return adjList;

  }
This function will return an adjacency list for the nodes
present in the current system. The list may be restricted by
optional filters.

@param {string} [groupBy='to'] - Specifies by which property the
    adjacency list is indexed. May be either 'from' or 'to'.
@param {Hashmap} [opts] - An optional options object.
@param {Hashmap} [opts.typeWL] - A whitelist lookup-table
   that restricts which edge-types are included.
@param {Hashmap} [opts.edges] - A set of edges on which basis
    the adjacency list is build. If not provided,
    all edges in the system are considered.
@return {Object<Id, Array<Edge>>} For each key (a node id) an
    array of edges pointing 'from' (or 'to'; depends on `groupBy`)
    is supplied as value.