def _validate_integer(self, key, axis):
len_axis = len(self.obj._get_axis(axis))<EOL>if key >= len_axis or key < -len_axis:<EOL><INDENT>raise IndexError("<STR_LIT>")<EOL><DEDENT>
Check that 'key' is a valid position in the desired axis.

Parameters
----------
key : int
    Requested position
axis : int
    Desired axis

Returns
-------
None

Raises
------
IndexError
    If 'key' is not a valid position in axis 'axis'