code: def _get_axis_len(aname, a, axis):
      ax = axis
      if ax < 0:
          ax += a.ndim
      if 0 <= ax < a.ndim:
          return a.shape[ax]
      raise ValueError(f"'{aname}axis' entry is out of bounds")
  
imports: from warnings import warn
  from itertools import product
  import numpy
  from numpy import atleast_1d, atleast_2d
  from .lapack import get_lapack_funcs, _compute_lwork
  from ._misc import LinAlgError, _datacopied, LinAlgWarning
  from ._decomp import _asarray_validated
  from .None import _decomp, _decomp_svd
  from ._solve_toeplitz import levinson
  from ._cythonized_array_utils import find_det_from_lu
  from scipy._lib.deprecation import _NoValue, _deprecate_positional_args
label_desc: Use image node_id 7 for calling a global function with example usage: _get_axis_len(aname, a, axis) and returns: a