code: def _check_axis(ndim, axis):
      if axis < 0 or axis >= ndim:
          raise ValueError(
              "axis must be in the range of [0, ndim). axis : {}, ndim: {}.".format(
                  axis, ndim
              )
          )
  
imports: from __future__ import absolute_import
  from .function_bases import *
  from six.moves import reduce
  import numpy
  import nnabla
label_desc: Use image node_id 1 for calling a global function with example usage: _check_axis(ndim, axis) without return types