def validate_minmax_axis(axis):
ndim = <NUM_LIT:1>  <EOL>if axis is None:<EOL><INDENT>return<EOL><DEDENT>if axis >= ndim or (axis < <NUM_LIT:0> and ndim + axis < <NUM_LIT:0>):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>".format(ndim=ndim))<EOL><DEDENT>
Ensure that the axis argument passed to min, max, argmin, or argmax is
zero or None, as otherwise it will be incorrectly ignored.

Parameters
----------
axis : int or None

Raises
------
ValueError