code: def gamma(
      shape, scale=1.0, size=None, dtype=None, device=None, out=None
  ):
      """Draw samples from a Gamma distribution.
  
      Samples are drawn from a Gamma distribution with specified parameters,
      `shape` (sometimes designated "k") and `scale` (sometimes designated
      "theta"), where both parameters are > 0.
  
      Parameters
      ----------
      shape : float or array_like of floats
          The shape of the gamma distribution. Should be greater than zero.
      scale : float or array_like of floats, optional
          The scale of the gamma distribution. Should be greater than zero.
          Default is equal to 1.
      size : int or tuple of ints, optional
          Output shape.  If the given shape is, e.g., ``(m, n, k)``, then
          ``m * n * k`` samples are drawn.  If size is ``None`` (default),
          a single value is returned if ``shape`` and ``scale`` are both scalars.
          Otherwise, ``np.broadcast(shape, scale).size`` samples are drawn.
      dtype : {'float16', 'float32', 'float64'}, optional
          Data type of output samples.
          When npx.is_np_default_dtype() returns False, default dtype is float32;
          When npx.is_np_default_dtype() returns True, default dtype is float64.
      device : Device, optional
          Device context of output. Default is current device.
  
      Returns
      -------
      out : ndarray or scalar
          Drawn samples from the parameterized gamma distribution.
  
      The Gamma distribution is often used to model the times to failure of
      electronic components, and arises naturally in processes for which the
      waiting times between Poisson distributed events are relevant.
      """
      if out is not None:
          size = out.shape
      if size == ():
          size = None
      if device is None:
          device = str(current_device())
      else:
          device = str(device)
      if dtype is not None and not isinstance(dtype, str):
          dtype = get_dtype_name(dtype)
      return _api_internal.gamma(shape, scale, size, device, dtype, out)
  
imports: import numpy
  from ...util import is_np_default_dtype
  from ...device import current_device
  from .None import _internal
  from .None import _api_internal
  from ...util import wrap_ctx_to_device_func
  from ..ndarray import get_dtype_name
label_desc: Use image node_id 15 for calling a global function with example usage: gamma(shape, scale, size, dtype, device, out) and returns: _api_internal