code: def validate_character_instance_valid_for_arc(sender, instance, action, reverse, pk_set, *args, **kwargs):
      '''
      Evaluate attempts to assign a character instance to ensure it is from same
      outline.
      '''
      if action == 'pre_add':
          if reverse:
              # Fetch arc definition through link.
              for apk in pk_set:
                  arc_node = ArcElementNode.objects.get(pk=apk)
                  if arc_node.parent_outline != instance.outline:
                      raise IntegrityError(_('Character Instance and Arc Element must be from same outline.'))
          else:
              for cpk in pk_set:
                  char_instance = CharacterInstance.objects.get(pk=cpk)
                  if char_instance.outline != instance.parent_outline:
                      raise IntegrityError(_('Character Instance and Arc Element must be from the same outline.')f validate_character_instance_valid_for_arc(sender, instance, action, reverse, pk_set, *args, **kwargs):
      '''
      Evaluate attempts to assign a character instance to ensure it is from same
      outline.
      '''
      if action == 'pre_add':
          if reverse:
              # Fetch arc definition through link.
              for apk in pk_set:
                  arc_node = ArcElementNode.objects.get(pk=apk)
                  if arc_node.parent_outline != instance.outline:
                      raise IntegrityError(_('Character Instance and Arc Element must be from same outline.'))
          else:
              for cpk in pk_set:
                  char_instance = CharacterInstance.objects.get(pk=cpk)
                  if char_instance.outline != instance.parent_outline:
                      raise IntegrityError(_('Character Instance and Arc Element must be from the same outline.'))
docs: Evaluate attempts to assign a character instance to ensure it is from same
      outline.