code: def make_weights_axis_0(request):
      """Specific to `test_sample*_axis_0` tests.
      Only testing weights array that matches type with random state.
      """
  
      if request.param is None:
          return lambda *_: (None, None)
      elif request.param == "builtin-list":
          return lambda size, _: ([1] * size, [1] * size)
      else:
  
          def wrapped(size, numpy_weights_for_cudf):
              # Uniform distribution, non-normalized
              if numpy_weights_for_cudf:
                  return np.ones(size), np.ones(size)
              else:
                  return np.ones(size), cp.ones(size)
  
          return wrapped
  
imports: import itertools
  import os
  import pathlib
  import cupy
  import numpy
  import pytest
  import rmm
  import cudf
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 7 for calling a global function with example usage: make_weights_axis_0(request) and returns: function, function, wrapped, np,  np, np,  cp