code: def _nth_slice(i, ndim):
      sl = [np.newaxis] * ndim
      sl[i] = slice(None)
      return tuple(sl)
  
imports: import operator
  import functools
  import warnings
  import numpy
  from numpy.core.multiarray import dragon4_positional, dragon4_scientific
  from numpy.core.umath import absolute
label_desc: Use image node_id 7 for calling a global function with example usage: _nth_slice(i, ndim) and returns: tuple