code: def _raw_fft(x, n, axis, direction, overwrite_x, work_function):
      """Internal auxiliary function for fft, ifft, rfft, irfft."""
      if n is None:
          n = x.shape[axis]
      elif n != x.shape[axis]:
          x, copy_made = _fix_shape(x, n, axis)
          overwrite_x = overwrite_x or copy_made
  
      if n < 1:
          raise ValueError(
              "Invalid number of FFT data points " "(%d) specified." % n
          )
  
      if axis == -1 or axis == len(x.shape) - 1:
          r = work_function(x, n, direction, overwrite_x=overwrite_x)
      else:
          x = swapaxes(x, axis, -1)
          r = work_function(x, n, direction, overwrite_x=overwrite_x)
          r = swapaxes(r, axis, -1)
      return r
  
imports: from __future__ import division, print_function, absolute_import
  from numpy import swapaxes, zeros
  import numpy
  from .None import _fftpack
  from scipy.fftpack.helper import _init_nd_shape_and_axes_sorted
  import atexit
label_desc: Use image node_id 10 for calling a global function with example usage: _raw_fft(x, n, axis, direction, overwrite_x, work_function) and returns: r