code: def _execute_1D(
      func_str,
      pocketfft_func,
      x,
      n,
      axis,
      norm,
      overwrite_x,
      workers,
      plan,
  ):
      xp = array_namespace(x)
  
      if is_numpy(xp):
          return pocketfft_func(
              x,
              n=n,
              axis=axis,
              norm=norm,
              overwrite_x=overwrite_x,
              workers=workers,
              plan=plan,
          )
  
      norm = _validate_fft_args(workers, plan, norm)
      if hasattr(xp, "fft"):
          xp_func = getattr(xp.fft, func_str)
          return xp_func(x, n=n, axis=axis, norm=norm)
  
      x = np.asarray(x)
      y = pocketfft_func(x, n=n, axis=axis, norm=norm)
      return xp.asarray(y)
  
imports: from scipy._lib._array_api import array_namespace, is_numpy, xp_unsupported_param_msg, is_complex
  from .None import _pocketfft
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _execute_1D(func_str, pocketfft_func, x, n, axis, norm, overwrite_x, workers, plan) and returns: xp, pocketfft_func, xp_func