code: def _raw_fft(a, n, axis, is_real, is_forward, inv_norm):
      axis = normalize_axis_index(axis, a.ndim)
      if n is None:
          n = a.shape[axis]
  
      fct = 1 / inv_norm
  
      if a.shape[axis] != n:
          s = list(a.shape)
          index = [slice(None)] * len(s)
          if s[axis] > n:
              index[axis] = slice(0, n)
              a = a[tuple(index)]
          else:
              index[axis] = slice(0, s[axis])
              s[axis] = n
              z = zeros(s, a.dtype.char)
              z[tuple(index)] = a
              a = z
  
      if axis == a.ndim - 1:
          r = pfi.execute(a, is_real, is_forward, fct)
      else:
          a = swapaxes(a, axis, -1)
          r = pfi.execute(a, is_real, is_forward, fct)
          r = swapaxes(r, axis, -1)
      return r
  
imports: import functools
  import warnings
  from numpy.lib.array_utils import normalize_axis_index
  from numpy._core import asarray, zeros, swapaxes, conjugate, take, sqrt
  from .None import _pocketfft_internal
  from numpy._core import overrides
label_desc: Use image node_id 1 for calling a global function with example usage: _raw_fft(a, n, axis, is_real, is_forward, inv_norm) and returns: r