code: def negative_binomial(
      k=1, p=1, shape=_Null, dtype=_Null, ctx=None, out=None, **kwargs
  ):
      """Draw random samples from a negative binomial distribution.
  
      Samples are distributed according to a negative binomial distribution
      parametrized by *k* (limit of unsuccessful experiments) and *p* (failure
      probability in each experiment). Samples will always be returned as a
      floating point data type.
  
      Parameters
      ----------
      k : float or NDArray, optional
          Limit of unsuccessful experiments, > 0.
      p : float or NDArray, optional
          Failure probability in each experiment, >= 0 and <=1.
      shape : int or tuple of ints, optional
          The number of samples to draw. If shape is, e.g., `(m, n)` and `k` and
          `p` are scalars, output shape will be `(m, n)`. If `k` and `p`
          are NDArrays with shape, e.g., `(x, y)`, then output will have shape
          `(x, y, m, n)`, where `m*n` samples are drawn for each `[k, p)` pair.
      dtype : {'float16', 'float32', 'float64'}, optional
          Data type of output samples. Default is 'float32'
      ctx : Context, optional
          Device context of output. Default is current context. Overridden by
          `k.context` when `k` is an NDArray.
      out : NDArray, optional
          Store output to an existing NDArray.
  
      Returns
      -------
      NDArray
          If input `shape` has shape, e.g., `(m, n)` and `k` and `p` are scalars, output shape
          will be `(m, n)`. If `k` and `p` are NDArrays with shape, e.g., `(x, y)`, then
          output will have shape `(x, y, m, n)`, where `m*n` samples are drawn for each `[k, p)` pair.
  
      Examples
      --------
      >>> mx.nd.random.negative_binomial(10, 0.5)
      [ 4.]
      <NDArray 1 @cpu(0)>
      >>> mx.nd.random.negative_binomial(10, 0.5, shape=(2,))
      [ 3.  4.]
      <NDArray 2 @cpu(0)>
      >>> k = mx.nd.array([1,2,3])
      >>> p = mx.nd.array([0.2,0.4,0.6])
      >>> mx.nd.random.negative_binomial(k, p, shape=2)
      [[ 3.  2.]
       [ 4.  4.]
       [ 0.  5.]]
      <NDArray 3x2 @cpu(0)>
      """
      return _random_helper(
          _internal._random_negative_binomial,
          _internal._sample_negative_binomial,
          [k, p],
          shape,
          dtype,
          ctx,
          out,
          kwargs,
      )
  
file_path: mxnet/python/mxnet/ndarray/random.py
imports: from ..base import numeric_types, _Null
  from ..context import current_context
  from .None import _internal
  from .ndarray import NDArray
label_desc: Use image node_id 9 for calling a global function with example usage: negative_binomial(k, p, shape, dtype, ctx, out) and returns: _random_helper