<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _validate_index(self, index):
 """Validates given index, eventually raises errors."""

        if isinstance(index, slice):
            if index.step and index.step != 1:
                raise IndexError('Step is not allowed.')
            indexes = (index.start, index.stop)
        else:
            indexes = (index,)
        for index in indexes:
            if index is not None and index < 0:
                raise IndexError('Negative indexes are not allowed.')