code: def score_to_label(pred_scores, outliers_fraction=0.1):
      """Turn raw outlier outlier scores to binary labels (0 or 1).
  
      Parameters
      ----------
      pred_scores : list or numpy array of shape (n_samples,)
          Raw outlier scores. Outliers are assumed have larger values.
  
      outliers_fraction : float in (0,1)
          Percentage of outliers.
  
      Returns
      -------
      outlier_labels : numpy array of shape (n_samples,)
          For each observation, tells whether or not
          it should be considered as an outlier according to the
          fitted model. Return the outlier probability, ranging
          in [0,1].
      """
      # check input values
      pred_scores = column_or_1d(pred_scores)
      check_parameter(outliers_fraction, 0, 1)
  
      threshold = percentile(pred_scores, 100 * (1 - outliers_fraction))
      pred_labels = (pred_scores > threshold).astype("int")
      return pred_labels
  
imports: from __future__ import division
  from __future__ import print_function
  import numbers
  import numpy
  import sklearn
  from numpy import percentile
  from sklearn.metrics import precision_score
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils import check_array
  from sklearn.utils import check_consistent_length
  from sklearn.utils import check_random_state
  from sklearn.utils import column_or_1d
  from sklearn.utils.random import sample_without_replacement
label_desc: Use image node_id 4 for calling a global function with example usage: score_to_label(pred_scores, outliers_fraction) and returns: pred_labels