code: def _swap_type_direction(type):
      try:
          return _swap_type_dictionary[type]
      except KeyError:
          raise ValueError(f"Invalid type value {type}")
  
imports: import itertools
  import math
  from numbers import Number
  import operator
  from .None import numpy_fft
  from ..builders._utils import _default_effort, _default_threads, _cook_nd_args
  from ._utils import _Xfftn
  import numpy
  from scipy.fftpack import diff, tilbert, itilbert, hilbert, ihilbert, cs_diff, sc_diff, ss_diff, cc_diff, shift, fftshift, ifftshift, fftfreq, rfftfreq, convolve
  from ..pyfftw import next_fast_len
label_desc: Use image node_id 15 for calling a global function with example usage: _swap_type_direction(type) and returns: _swap_type_dictionary