def remove_duplicate_edges_directed(dg):
<EOL>lookup = {}<EOL>edges = sorted(dg.get_all_edge_ids())<EOL>for edge_id in edges:<EOL><INDENT>e = dg.get_edge(edge_id)<EOL>tpl = e['<STR_LIT>']<EOL>if tpl in lookup:<EOL><INDENT>dg.delete_edge_by_id(edge_id)<EOL><DEDENT>else:<EOL><INDENT>lookup[tpl] = edge_id<EOL><DEDENT><DEDENT>
Removes duplicate edges from a directed graph.