code: def score_to_proba(scores):
      """Internal function to random score matrix into probability.
  
      Parameters
      ----------
      scores : numpy array of shape (n_samples, n_classes)
          Raw score matrix.
  
      Returns
      -------
      proba : numpy array of shape (n_samples, n_classes)
          Scaled probability matrix.
      """
  
      scores_sum = np.sum(scores, axis=1).reshape(scores.shape[0], 1)
      scores_sum_broadcast = np.broadcast_to(
          scores_sum, (scores.shape[0], scores.shape[1])
      )
      proba = scores / scores_sum_broadcast
      return proba
  
imports: import numpy
  from numpy import percentile
  from sklearn.metrics import precision_score
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils import column_or_1d
  from sklearn.utils import check_array
  from sklearn.utils import check_consistent_length
  from sklearn.utils import check_random_state
  from sklearn.utils.random import sample_without_replacement
  from pyod.utils.utility import check_parameter
label_desc: Use image node_id 10 for calling a global function with example usage: score_to_proba(scores) and returns: proba