code: def custom_softmax(logits: np.ndarray) -> np.ndarray:
      x_max = np.amax(logits, axis=1, keepdims=True)
      exp_x_shifted = np.exp(logits - x_max)
      y_pred_proba = exp_x_shifted / np.sum(
          exp_x_shifted, axis=1, keepdims=True
      )
      return y_pred_proba
  
imports: import numpy
  from autogluon.common.utils.try_import import try_import_torch
  from ..constants import BINARY
  from ..data.label_cleaner import LabelCleanerMulticlassToBinary
label_desc: Use image node_id 2 for calling a global function with example usage: custom_softmax(logits) and returns: y_pred_proba