code: function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) {
    while (size > sizeLimit) {
      // Choose an edge randomly
      var edgeIndex = Math.floor(Math.random() * remainingEdges.length); // Collapse graph based on edge
  
      remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges);
      size--;
    }
  
    return remainingEdges;
  }
docs: Contracts a graph until we reach a certain number of meta nodes