def getEdges(G, path):
    """
    Return a graph with the desiderable interval
    
            Parameters:
                    G: the graph we are working on 
                    path(dictionary): as key the node and as value the parent node
            Returns: 
                    e1(list): all edges that weight is equal to 1
                    e2(list): all edges that weight is equal to 2
                    e3(list): all edges that weight is equal to 3
                    edge_path1: all edges of the shortes path that weight is equal to 1
                    edge_path2: all edges of the shortes path that weight is equal to 2
                    edge_path3: all edges of the shortes path that weight is equal to 3                 
    """
    e1 = []
    e2 = []
    e3 = []   
    edge_path1 = []
    edge_path2 = []
    edge_path3 = []
    
    edge_path = []
    
    for i in range(len(path)-1):
        edge_path.append((path[i],path[i+1]))

    for (x, y, w) in G.edges(data = True):
        if x != y and w["weight"] == 1:
            e1.append((x,y))
            if (x,y) in edge_path:
                edge_path1.append((x,y))             
        elif x != y and w["weight"] == 2:
            e2.append((x,y))
            if (x,y) in edge_path:
                edge_path2.append((x,y))                     
        elif x != y and w["weight"] == 3:
            e3.append((x,y))       
            if (x,y) in edge_path:
                edge_path3.append((x,y))  
                
    return e1, e2, e3, edge_path1, edge_path2, edge_path3