def actors_to_movie(data):
    """
    Creates a mapping between two actors and their shared movie.
    Returns a dictionary with the format {(actor_id_1, actor_id_2): movie_id}.
    """
    
    d = {}
    for i in data:
        d[(i[0], i[1])] = i[2]
        d[(i[1], i[0])] = i[2]
    return d