def zipf(
    a: float,
    size: NdShapeLike | None = None,
    dtype: npt.DTypeLike = np.uint32,
) -> ndarray:
    """
    zipf(a, size=None)

    Draw samples from a Zipf distribution.

    Samples are drawn from a Zipf distribution with specified parameter
    `a` > 1.

    The Zipf distribution (also known as the zeta distribution) is a
    discrete probability distribution that satisfies Zipf's law: the
    frequency of an item is inversely proportional to its rank in a
    frequency table.

    Parameters
    ----------
    a : float
        Distribution parameter. Must be greater than 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.  Default is None, in which case a
        single value is returned.

    Returns
    -------
    out : ndarray or scalar
        Drawn samples from the parameterized Zipf distribution.

    See Also
    --------
    numpy.random.zipf

    Availability
    --------
    Multiple GPUs, Multiple CPUs
    """
    return get_static_generator().zipf(a, size, dtype)

    zipf(a, size=None)

    Draw samples from a Zipf distribution.

    Samples are drawn from a Zipf distribution with specified parameter
    `a` > 1.

    The Zipf distribution (also known as the zeta distribution) is a
    discrete probability distribution that satisfies Zipf's law: the
    frequency of an item is inversely proportional to its rank in a
    frequency table.

    Parameters
    ----------
    a : float
        Distribution parameter. Must be greater than 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.  Default is None, in which case a
        single value is returned.

    Returns
    -------
    out : ndarray or scalar
        Drawn samples from the parameterized Zipf distribution.

    See Also
    --------
    numpy.random.zipf

    Availability
    --------
    Multiple GPUs, Multiple CPUs
    
cupynumeric/random/_random.py