def clean_euler_path(eulerian_path: list) -> list:
    """Cleans a Eulerian path so that each edge (not directed) appears only once in the list. If a edge appears more than once, only the first occurrence is kept.

    Arguments:
        eulerian_path {list} -- Eulerian path

    Returns:
        list -- cleaned Eulerian path
    """  # noqa
    path = []
    for edge in eulerian_path:
        if edge not in path and edge[::-1] not in path:
            path.append(edge)
    return path