code: def weibull(a, size=None, device=None, out=None):
      r"""Draw samples from a 1-parameter Weibull distribution with given parameter a
      via inversion.
  
      Parameters
      ----------
      a : float or array_like of floats
          Shape of the distribution. Must be non-negative.
      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 ``a`` is a scalar. Otherwise,
          ``np.array(a).size`` samples are drawn.
  
      Returns
      -------
      out : ndarray or scalar
          Drawn samples from the 1-parameter Weibull distribution.
  
      Examples
      --------
      >>> np.random.weibull(a=5)
      array(0.9553641)
      >>> np.random.weibull(a=5, size=[2,3])
      array([[1.0466299 , 1.1320982 , 0.98415005],
            [1.1430776 , 0.9532727 , 1.1344457 ]])
      >>> np.random.weibull(a=np.array([2,3])
      array([0.98843634, 1.0125613 ])
      The Weibull distribution is one of a class of Generalized Extreme
      Value (GEV) distributions. This class includes the Gumbel and Frechet
      distributions.
      The probability density for the Weibull distribution is
      f(x) = \frac{a}{\lambda}(\frac{x}{\lambda})^{a-1}e^{-(x/\lambda)^a},
      where a is the shape and \lambda the scale. The generated 1-parameter Weibull
      sample has the scale parameter \lambda = 1.
      The Weibull distribution is commonly used in reliability engineering to
      model time to failure, in modeling particle sizes, in information retrieval
      to model dwell time on pages, in quantitative finance to model risk etc.
      """
      return _mx_nd_np.random.weibull(
          a, size=size, device=device, out=out
      )
  
imports: from ..ndarray import numpy
  from ..random import seed
  from ..util import wrap_ctx_to_device_func
label_desc: Use image node_id 13 for calling a global function with example usage: weibull(a, size, device, out) and returns: _mx_nd_np