code: def softmax(y_pred: dict):
      """Normalizes a dictionary of predicted probabilities, in-place.
  
      Parameters
      ----------
      y_pred
  
      """
  
      if not y_pred:
          return y_pred
  
      maximum = max(y_pred.values())
      total = 0.0
  
      for c, p in y_pred.items():
          y_pred[c] = math.exp(p - maximum)
          total += y_pred[c]
  
      for c in y_pred:
          y_pred[c] /= total
  
      return y_pred
  
imports: from __future__ import annotations
  import functools
  import itertools
  import math
  import operator
  import numpy
  import scipy
label_desc: Use image node_id 5 for calling a global function with example usage: softmax(y_pred) and returns: y_pred, y_pred