def __check_axes(axes):
if axes is None:<EOL><INDENT>import matplotlib.pyplot as plt<EOL>axes = plt.gca()<EOL><DEDENT>elif not isinstance(axes, Axes):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>".format(type(axes)))<EOL><DEDENT>return axes<EOL>
Check if "axes" is an instance of an axis object. If not, use `gca`.