code: def _numpy_stack(xs, axis):
      try:
          return numpy.stack(xs, axis)
      except AttributeError:
          # in case numpy<1.10, which does not have numpy.stack
          return numpy.concatenate(
              [numpy.expand_dims(x, axis) for x in xs], axis=axis
          )
  
file_path: chainer/tests/chainer_tests/distributions_tests/test_one_hot_categorical.py
imports: import numpy
  from chainer import cuda
  from chainer import distributions
  from chainer import testing
label_desc: Use image node_id 1 for calling a global function with example usage: _numpy_stack(xs, axis) and returns: numpy, numpy