code: def multinomial(
      n=[1], p=[[1.0]], shape=_Null, dtype="float32", **kwargs
  ):
      """Concurrent sampling from multiple multinomial distributions.
  
      .. note:: The input distribution must be normalized, i.e. `p` must sum to
                1 along its last dimension.
  
      Parameters
      ----------
      n : Symbol
          An *n* dimensional array containing the number of trials of each
          multinomial distribution.
      p : Symbol
          An *n+1* dimensional array containing the probabilities of each multinomial
          distribution. Its last dimension has length `k`, where `k` is the number
          of possible outcomes of each multinomial distribution.
          For example, p with shape `(m, n, k)` specifies `m*n` multinomial
          distributions each with `k` possible outcomes.
      shape : int or tuple of ints, optional
          The number of samples to draw from each distribution. If shape is empty
          one sample will be drawn from each distribution.
      dtype : {'float16', 'float32', 'float64'}, optional
          Data type of output samples. Default is 'float32'
  
      Returns
      -------
      Symbol
          If input `shape` has shape, e.g., `(m, n)` and `n` and `p` are a scalar and an array of length k
          respectively, output shape will be `(m, n, k)`. If `n` and `p` are NDArrays with shape, e.g.,
          `(x, y)` and `(x, y, k)`, then output will have shape `(x, y, m, n, k)`, where `m*n`
          samples are drawn for each `[n, p)` pair.
      """
      return _internal._sample_multinomial(
          n, p, shape, dtype=dtype, **kwargs
      )
  
file_path: mxnet/python/mxnet/symbol/random.py
imports: from ..base import numeric_types, _Null
  from .None import _internal
  from .symbol import Symbol
label_desc: Use image node_id 12 for calling a global function with example usage: multinomial(n, p, shape, dtype) and returns: _internal