Created a function to copy a digraph.