code: def poisson(lam=1.0, size=None, dtype=int):
      """Poisson distribution.
  
      Returns an array of samples drawn from the poisson distribution. Its
      probability mass function is defined as
  
      .. math::
          f(x) = \\frac{\\lambda^xe^{-\\lambda}}{k!}.
  
      Args:
          lam (array_like of floats): Parameter of the poisson distribution
              :math:`\\lambda`.
          size (int or tuple of ints): The shape of the array. If ``None``, this
              function generate an array whose shape is `lam.shape`.
          dtype: Data type specifier. Only :class:`numpy.int32` and
              :class:`numpy.int64` types are allowed.
  
      Returns:
          cupy.ndarray: Samples drawn from the poisson distribution.
  
      .. seealso:: :func:`numpy.random.poisson`
      """
      rs = _generator.get_random_state()
      return rs.poisson(lam, size, dtype)
  
imports: from cupy.random import _generator
  from cupy import _util
label_desc: Use image node_id 21 for calling a global function with example usage: poisson(lam, size, dtype) and returns: rs