def same_species_lists(list1, list2, check_identical=False, only_check_label=False, generate_initial_map=False,
                       strict=True):
    """
    This method compares whether two lists of species or molecules are the same,
    given the comparison options provided. It is used for the `is_same` method
    of :class:`Reaction`, but may also be useful in other situations.

    Args:
        list1 (list):                          list of :class:`Species` or :class:`Molecule` objects
        list2 (list):                          list of :class:`Species` or :class:`Molecule` objects
        check_identical (bool, optional):      if ``True``, use is_identical comparison and compare atom IDs
        only_check_label (bool, optional):     if ``True``, only compare the label attribute of each species
        generate_initial_map (bool, optional): if ``True``, initialize map by pairing atoms with same labels
        strict (bool, optional):               if ``False``, perform isomorphism ignoring electrons

    Returns:
        ``True`` if the lists are the same and ``False`` otherwise
    """

    def same(object1, object2, _check_identical=check_identical, _only_check_label=only_check_label,
             _generate_initial_map=generate_initial_map, _strict=strict):
        if _only_check_label:
            return str(object1) == str(object2)
        elif _check_identical:
            return object1.is_identical(object2, strict=_strict)
        else:
            return object1.is_isomorphic(object2, generate_initial_map=_generate_initial_map, strict=_strict)

    if len(list1) == len(list2) == 1:
        if same(list1[0], list2[0]):
            return True
    elif len(list1) == len(list2) == 2:
        if same(list1[0], list2[0]) and same(list1[1], list2[1]):
            return True
        elif same(list1[0], list2[1]) and same(list1[1], list2[0]):
            return True
    elif len(list1) == len(list2) == 3:
        if same(list1[0], list2[0]):
            if same(list1[1], list2[1]):
                if same(list1[2], list2[2]):
                    return True
            elif same(list1[1], list2[2]):
                if same(list1[2], list2[1]):
                    return True
        elif same(list1[0], list2[1]):
            if same(list1[1], list2[0]):
                if same(list1[2], list2[2]):
                    return True
            elif same(list1[1], list2[2]):
                if same(list1[2], list2[0]):
                    return True
        elif same(list1[0], list2[2]):
            if same(list1[1], list2[0]):
                if same(list1[2], list2[1]):
                    return True
            elif same(list1[1], list2[1]):
                if same(list1[2], list2[0]):
                    return True
    elif len(list1) == len(list2):
        raise NotImplementedError("Can't check isomorphism of lists with {0} species/molecules".format(len(list1)))
    # nothing found
    return False