code: def _test_load_helper(self, xp, dtype, fft_func):
      fft = getattr(xp.fft, fft_func)
      load_code = _load_callback
      if dtype == np.complex64:
          types = ("x.x", "cufftComplex", "cufftCallbackLoadC")
      elif dtype == np.complex128:
          types = ("x.x", "cufftDoubleComplex", "cufftCallbackLoadZ")
      elif dtype == np.float32:
          types = ("x", "cufftReal", "cufftCallbackLoadR")
      else:
          types = ("x", "cufftDoubleReal", "cufftCallbackLoadD")
      cb_load = _set_load_cb(load_code, *types)
  
      a = testing.shaped_random(self.shape, xp, dtype)
      if xp is np:
          a.real *= 2.5
          out = fft(a, s=self.s, axes=self.axes, norm=self.norm)
          if dtype in (np.float32, np.complex64):
              if fft_func != "irfftn":
                  out = out.astype(np.complex64)
              else:
                  out = out.astype(np.float32)
      else:
          with use_temporary_cache_dir():
              with xp.fft.config.set_cufft_callbacks(cb_load=cb_load):
                  out = fft(a, s=self.s, axes=self.axes, norm=self.norm)
  
      return out
  
imports: import contextlib
  import string
  import sys
  import tempfile
  from unittest import mock
  import numpy
  import pytest
  import cupy
  from cupy import testing
label_desc: Use image node_id 1 for calling the TestNdCallbacks obj's underlying member method code with example usage: obj._test_load_helper(xp, dtype, fft_func) and returns: out