@Override
  public void process(VertexInducedEmbedding embedding) {
    if (embedding.getNumVertices() == 3) {
      IntArrayList vertices = embedding.getVertices();

      for (int i = 0; i < 3; ++i) {
        reusableIdWritable.set(vertices.getUnchecked(i));
        map(AGG_OUTPUT, reusableIdWritable, unitLongWritable);
      }
    }
  }
 @Override
 public boolean shouldExpand(VertexInducedEmbedding embedding) {
   return embedding.getNumVertices() < 3;
 }
 @Override
 public boolean filter(VertexInducedEmbedding embedding) {
   return embedding.getNumVertices() < 3
       || (embedding.getNumVertices() == 3 && embedding.getNumEdges() == 3);
 }