Moves the nodes and edges from the specified Graph object to this Graph object. The argument graph is emptied as as result of the operation.