def acted_together(data, actor_id_1, actor_id_2):
    """ Returns True if the two given actors 
    ever acted together in a film and False otherwise. """
    
    # If both actor IDs are in the tuple, they acted together
    for d in data:
        if (actor_id_1 in d) and (actor_id_2 in d):
            return True
    return False