code: def logit2prob(logit, binary=True):
      r"""Convert logit into probability form.
      For the binary case, `sigmoid()` is applied on the logit tensor.
      Whereas for the multinomial case, `softmax` is applied along the last
      dimension of the logit tensor.
      """
      if binary:
          return npx.sigmoid(logit)
      return npx.softmax(logit)
  
file_path: mxnet/python/mxnet/gluon/probability/distributions/utils.py
imports: from functools import update_wrapper
  from numbers import Number
  import numpy
  from ....None import np, npx
label_desc: Use image node_id 11 for calling a global function with example usage: logit2prob(logit, binary) and returns: npx, npx