'``setkeys`` all ows you to pass in a new list of keys which will
replace the current set. This must contain the same set of keys, but
need not be in the same order.
If you pass in new keys that don\'t match, a ``KeyError`` will be
raised.
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.keys()
[1, 3, 2]
>>> d.setkeys((1, 2, 3))
>>> d
OrderedDict([(1, 3), (2, 1), (3, 2)])
>>> d.setkeys([\'a\', \'b\', \'c\'])
Traceback (most recent call last):
KeyError: \'Keylist is not the same as current keylist.\''

def setkeys(self, keys):

    kcopy = list(keys)
    kcopy.sort()
    self._sequence.sort()
    if (kcopy != self._sequence):
        raise KeyError('Keylist    is    not    the    same    as    current    keylist.')
    self._sequence = list(keys)
