code: def rand_data_gen():
      def _generate(num_samps, dim=1, dtype=np.float64):
          if dtype is np.float32 or dtype is np.float64:
              inp = tuple(np.ones(dim, dtype=int) * num_samps)
              cpu_sig = np.random.random(inp)
              cpu_sig = cpu_sig.astype(dtype)
              gpu_sig = cp.asarray(cpu_sig)
          else:
              inp = tuple(np.ones(dim, dtype=int) * num_samps)
              cpu_sig = np.random.random(inp) + 1j * np.random.random(
                  inp
              )
              cpu_sig = cpu_sig.astype(dtype)
              gpu_sig = cp.asarray(cpu_sig)
  
          return cpu_sig, gpu_sig
  
      return _generate
  
file_path: cusignal/python/cusignal/test/conftest.py
imports: import cupy
  import numpy
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: rand_data_gen() and returns: _generate, cpu_sig,  gpu_sig