code: def gumbel(loc=0.0, scale=1.0, size=None, dtype=float):
      """Returns an array of samples drawn from a Gumbel distribution.
  
      The samples are drawn from a Gumbel distribution with location ``loc``
      and scale ``scale``.
      Its probability density function is defined as
  
      .. math::
         f(x) = \\frac{1}{\\eta} \
             \\exp\\left\\{ - \\frac{x - \\mu}{\\eta} \\right\\} \
             \\exp\\left[-\\exp\\left\\{-\\frac{x - \\mu}{\\eta} \
             \\right\\}\\right],
  
      where :math:`\\mu` is ``loc`` and :math:`\\eta` is ``scale``.
  
      Args:
          loc (float): The location of the mode :math:`\\mu`.
          scale (float): The scale parameter :math:`\\eta`.
          size (int or tuple of ints): The shape of the array. If ``None``, a
              zero-dimensional array is generated.
          dtype: Data type specifier. Only :class:`numpy.float32` and
              :class:`numpy.float64` types are allowed.
  
      Returns:
          cupy.ndarray: Samples drawn from the Gumbel distribution.
  
      .. seealso::
          :func:`numpy.random.gumbel`
      """
      rs = _generator.get_random_state()
      return rs.gumbel(loc, scale, size, dtype)
  
imports: from cupy.random import _generator
  from cupy import _util
label_desc: Use image node_id 9 for calling a global function with example usage: gumbel(loc, scale, size, dtype) and returns: rs