import copy


def subj_or_obj_in_annotations(annotations, item, rel, item_in_mod):
    """ Looks for item in the second pos of annotations AND rel in the first
    pos of the annotation. If both are found, it creates a new annotation
    [rel, item, item_in_mod] and returns it. Otherwise, it returns None"""
    annotations_copy = copy.deepcopy(annotations)
    for annotation in annotations_copy:
        if annotation[1] == item_in_mod and annotation[0] == rel:
            # For add_object, we have already switched the direction of
            # rel. So the annotation is going to be the same whether this
            # function was called from add_subject or add_object.
            new_annotation = [rel, item, item_in_mod]
            return new_annotation
    return None