code: def softmax(logits):
      
  
      assert logits.ndim == 1
  
      # for numerical reasons we subtract the max logit
      # (mathematically it doesn't matter!)
      # otherwise exp(logits) might become too large or too small
      logits = logits - np.max(logits)
      e = np.exp(logits)
      return e / np.sum(e)
docs: Transforms predictions into probability values.
  
      Parameters
      ----------
      logits : array_like
          The logits predicted by the model.
  
      Returns
      -------
      `numpy.ndarray`
          Probability values corresponding to the logits.