code: def softmax(X):
      """Compute the K-way softmax function inplace.
  
      Parameters
      ----------
      X : {array-like, sparse matrix}, shape (n_samples, n_features)
          The input data.
  
      Returns
      -------
      X_new : {array-like, sparse matrix}, shape (n_samples, n_features)
          The transformed data.
      """
      tmp = X - X.max(axis=1)[:, np.newaxis]
      np.exp(tmp, out=X)
      X /= X.sum(axis=1)[:, np.newaxis]
  
      return X
  
file_path: catboost/contrib/python/scikit-learn/py2/sklearn/neural_network/_base.py
imports: import numpy
  from ..utils.fixes import expit
label_desc: Use image node_id 5 for calling a global function with example usage: softmax(X) and returns: X