code: def _eval_fun(f, tmp, n, axis, nm, overwrite_x):
      if axis == -1 or axis == len(tmp.shape) - 1:
          return f(tmp, n, nm, overwrite_x)
  
      tmp = np.swapaxes(tmp, axis, -1)
      tmp = f(tmp, n, nm, overwrite_x)
      return np.swapaxes(tmp, axis, -1)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from scipy.fftpack import _fftpack
  from scipy.fftpack.basic import _datacopied, _fix_shape, _asfarray
  from scipy.fftpack.helper import _init_nd_shape_and_axes
  import atexit
label_desc: Use image node_id 12 for calling a global function with example usage: _eval_fun(f, tmp, n, axis, nm, overwrite_x) and returns: np, f