code: def softmax(values: np.ndarray) -> np.ndarray:
      """Modifications in place."""
      if len(values.shape) == 2:
          v_max = values.max(axis=1, keepdims=1)  # type: ignore
          values -= v_max
          np.exp(values, out=values)
          s = values.sum(axis=1, keepdims=1)  # type: ignore
          values /= s
          return values
      v_max = values.max()
      values[:] = np.exp(values - v_max)
      this_sum = values.sum()
      values /= this_sum
      return values
  
file_path: onnx/onnx/reference/ops/aionnxml/_common_classifier.py
imports: import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: softmax(values) and returns: values, values