def transitive_edges(graph):
<EOL>if not len(find_cycle(graph)) == <NUM_LIT:0>:<EOL><INDENT>return []<EOL><DEDENT>tranz_edges = [] <EOL>for start in topological_sorting(graph):<EOL><INDENT>successors = [] <EOL>for a in traversal(graph,start,'<STR_LIT>'):<EOL><INDENT>successors.append(a)<EOL><DEDENT>del successors[<NUM_LIT:0>] <EOL>for next in successors:<EOL><INDENT>intersect_array = _intersection(graph.neighbors(next), graph.neighbors(start) )<EOL>for a in intersect_array:<EOL><INDENT>if graph.has_edge((start, a)):<EOL><INDENT>tranz_edges.append( (start,a) )      <EOL><DEDENT><DEDENT><DEDENT><DEDENT>return tranz_edges<EOL>
Return a list of transitive edges.

Example of transitivity within graphs: A -> B, B -> C, A ->  C
in this case the transitive edge is: A -> C

@attention: This function is only meaningful for directed acyclic graphs.

@type graph: digraph
@param graph: Digraph

@rtype: List
@return: List containing tuples with transitive edges (or an empty array if the digraph
    contains a cycle)