<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _init_edges_relationships(rel2src2dsts, rel2dst2srcs):
 """Get the directed edges from GO term to GO term using relationships."""

        edge_rel2fromto = {}
        relationships = set(rel2src2dsts).union(rel2dst2srcs)
        for reltype in relationships:
            edge_from_to = []
            if reltype in rel2src2dsts:
                for parent, children in rel2src2dsts[reltype].items():
                    for child in children:
                        edge_from_to.append((child, parent))
            if reltype in rel2dst2srcs:
                for parent, children in rel2dst2srcs[reltype].items():
                    for child in children:
                        edge_from_to.append((child, parent))
            edge_rel2fromto[reltype] = edge_from_to
        return edge_rel2fromto