code: def _swap_direction(norm):
      if norm in (None, "backward"):
          norm = "forward"
      elif norm == "forward":
          norm = "backward"
      elif norm != "ortho":
          raise ValueError(
              'Invalid norm value %s; should be "backward", '
              '"ortho", or "forward".' % norm
          )
      return norm
  
imports: import functools
  import math
  import numpy
  import cupy
  from cupy.fft import config
  from cupy.fft._cache import get_plan_cache
label_desc: Use image node_id 28 for calling a global function with example usage: _swap_direction(norm) and returns: norm