'Fails if given lists are unequal.
The keyword first verifies that the lists have equal lengths, and then
it checks are all their values equal. Possible differences between the
values are listed in the default error message like ``Index 4: ABC !=
Abc``. The types of the lists do not need to be the same. For example,
Python tuple and list with same content are considered equal.
The error message can be configured using ``msg`` and ``values``
arguments:
- If ``msg`` is not given, the default error message is used.
- If ``msg`` is given and ``values`` gets a value considered true
(see `Boolean arguments`), the error message starts with the given
``msg`` followed by a newline and the default message.
- If ``msg`` is given and ``values``  is not given a true value,
the error message is just the given ``msg``.
Optional ``names`` argument can be used for naming the indices shown in
the default error message. It can either be a list of names matching
the indices in the lists or a dictionary where keys are indices that
need to be named. It is not necessary to name all of the indices.  When
using a dictionary, keys can be either integers or strings that can be
converted to integers.
Examples:
| ${names} = | Create List | First Name | Family Name | Email |
| Lists Should Be Equal | ${people1} | ${people2} | names=${names} |
| ${names} = | Create Dictionary | 0=First Name | 2=Email |
| Lists Should Be Equal | ${people1} | ${people2} | names=${names} |
If the items in index 2 would differ in the above examples, the error
message would contain a row like ``Index 2 (email): name@foo.com !=
name@bar.com``.'

def lists_should_be_equal(self, list1, list2, msg=None, values=True, names=None):

    len1 = len(list1)
    len2 = len(list2)
    default = ('Lengths    are    different:    %d    !=    %d' % (len1, len2))
    _verify_condition((len1 == len2), default, msg, values)
    names = self._get_list_index_name_mapping(names, len1)
    diffs = list(self._yield_list_diffs(list1, list2, names))
    default = ('Lists    are    different:\n' + '\n'.join(diffs))
    _verify_condition((diffs == []), default, msg, values)
