code: def random_sample(size=None, dtype=float):
      """Returns an array of random values over the interval ``[0, 1)``.
  
      This is a variant of :func:`cupy.random.rand`.
  
      Args:
          size (int or tuple of ints): The shape of the array.
          dtype: Data type specifier. Only :class:`numpy.float32` and
              :class:`numpy.float64` types are allowed.
  
      Returns:
          cupy.ndarray: An array of uniformly distributed random values.
  
      .. seealso:: :meth:`numpy.random.random_sample`
  
      """
      rs = _generator.get_random_state()
      return rs.random_sample(size=size, dtype=dtype)
  
file_path: cupy/cupy/random/_sample.py
imports: from cupy import _core
  from cupy._creation import basic
  from cupy.random import _distributions
  from cupy.random import _generator
label_desc: Use image node_id 5 for calling a global function with example usage: random_sample(size, dtype) and returns: rs