<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def validate_arc_links_same_outline(sender, instance, *args, **kwargs):
    '''
    Evaluates attempts to link an arc to a story node from another outline.
    '''
    if instance.story_element_node:
        if instance.story_element_node.outline != instance.parent_outline:
            raise IntegrityError(_('An arc cannot be associated with an story element from another outline.'))