Complete work to define graph-merging operation.