code: def validate_axis(ndim, axis, argname=None):
      if axis >= ndim or axis < -ndim:
          raise np.AxisError(axis, ndim=ndim, msg_prefix=argname)
  
      return axis if axis >= 0 else ndim + axis
  
imports: import inspect
  import itertools
  import operator
  from collections import OrderedDict
  from collections.abc import Iterable
  from functools import lru_cache, reduce, wraps
  from math import ceil
  from numbers import Integral
  from typing import Dict, List, Union
  import numpy
  from ..core import ExecutableTuple, recursive_tile
  from ..utils import lazy_import
  from ..lib.mmh3 import hash_from_buffer
label_desc: Use image node_id 6 for calling a global function with example usage: validate_axis(ndim, axis, argname) and returns: unknown