code: def direct_shift(x, a, period=None):
      n = len(x)
      if period is None:
          k = fftfreq(n) * 1j * n
      else:
          k = fftfreq(n) * 2j * pi / period * n
      return ifft(fft(x) * exp(k * a)).real
  
file_path: scipy/benchmarks/benchmarks/fftpack_pseudo_diffs.py
imports: from numpy import arange, sin, cos, pi, exp, tanh, sign
  from .common import Benchmark, safe_import
label_desc: Use image node_id 4 for calling a global function with example usage: direct_shift(x, a, period) and returns: ifft