docs: int keepLargeNetworks(PrepEdgeFilter filter, List<IntArrayList> components) {
          if (components.size() <= 1)
              return 0;
  
          int maxCount = -1;
          IntIndexedContainer oldComponent = null;
          int allRemoved = 0;
          BooleanEncodedValue accessEnc = filter.getAccessEnc();
          EdgeExplorer explorer = ghStorage.createEdgeExplorer(filter);
          for (IntArrayList component : components) {
              if (maxCount < 0) {
                  maxCount = component.size();
                  oldComponent = component;
                  continue;
              }
  
              int removedEdges;
              if (maxCount < component.size()) {
                  // new biggest area found. remove old
                  removedEdges = removeEdges(explorer, accessEnc, oldComponent, minNetworkSize);
  
                  maxCount = component.size();
                  oldComponent = component;
              } else {
                  removedEdges = removeEdges(explorer, accessEnc, component, minNetworkSize);
              }
  
              allRemoved += removedEdges;
          }
  
          if (allRemoved > ghStorage.getAllEdges().length() / 2)
              throw new IllegalStateException("Too many total edges were removed: " + allRemoved + ", all edges:" + ghStorage.getAllEdges().length());
          return allRemoved;
      }