code: def _output_dtype(dtype, value_type):
      if value_type != "R2C":
          if dtype in [np.float16, np.float32]:
              return np.complex64
          elif dtype not in [np.complex64, np.complex128]:
              return np.complex128
      else:
          if dtype in [np.complex64, np.complex128]:
              return np.dtype(dtype.char.lower())
          elif dtype == np.float16:
              return np.float32
          elif dtype not in [np.float32, np.float64]:
              return np.float64
      return dtype
  
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 1 for calling a global function with example usage: _output_dtype(dtype, value_type) and returns: dtype, np, np, np, np, np