code: def lombscargle_gen(rand_data_gen):
      def _generate(num_in_samps, num_out_samps):
          A = 2.0
          w = 1.0
          phi = 0.5 * np.pi
          frac_points = 0.9  # Fraction of points to select
  
          r, _ = rand_data_gen(num_in_samps, 1)
          cpu_x = np.linspace(0.01, 10 * np.pi, num_in_samps)
  
          cpu_x = cpu_x[r >= frac_points]
  
          cpu_y = A * np.cos(w * cpu_x + phi)
  
          cpu_f = np.linspace(0.01, 10, num_out_samps)
  
          gpu_x = cp.asarray(cpu_x)
          gpu_y = cp.asarray(cpu_y)
          gpu_f = cp.asarray(cpu_f)
  
          return cpu_x, cpu_y, cpu_f, gpu_x, gpu_y, gpu_f
  
      return _generate
  
file_path: cusignal/python/cusignal/test/conftest.py
imports: import cupy
  import numpy
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: lombscargle_gen(rand_data_gen) and returns: _generate, cpu_x,  cpu_y,  cpu_f,  gpu_x,  gpu_y,  gpu_f