'Provides the previous enumeration before the given value.
:param str value: enumeration for which to get the previous entry
:returns: enum value proceeding the given entry
:raises: **ValueError** if no such element exists'

def previous(self, value):

    if (value not in self._values):
        raise ValueError(('No    such    enumeration    exists:    %s    (options:    %s)' % (value, ',    '.join(self._values))))
    prev_index = ((self._values.index(value) - 1) % len(self._values))
    return self._values[prev_index]
