def get_likely_directed_edges(edges, data):
    """
    Gets directed edged based on likelihood for each undirected edge.

    :param edges: List of edges.
    :param data: Data.
    :return: List of directed edge.
    """
    directed_edges = []
    variables = data.get_variables(by_name=False)
    for edge in edges:
        v1 = variables[edge[0]]
        v2 = variables[edge[1]]
        v1_v2 = data.get_local_kutato(v1, [v2])
        v2_v1 = data.get_local_kutato(v2, [v1])
        if v1_v2 > v2_v1:
            t = edge[0], edge[1]
            directed_edges.append(t)
        elif v1_v2 < v2_v1:
            t = edge[1], edge[0]
            directed_edges.append(t)
    return directed_edges
