code: def cutoff_score_at_top_proportion(y_score, top_proportion):
      """
      Sort scores and get the score at
      """
      # Sort scores in descending order
      scores_sorted = np.sort(y_score)[::-1]
      # Based on the proportion, get the index to split th
      # if value is negative, return 0
      cutoff_index = max(int(len(y_score) * top_proportion) - 1, 0)
      # Get the cutoff value
      cutoff_value = scores_sorted[cutoff_index]
      return cutoff_value
  
file_path: sklearn-evaluation/src/sklearn_evaluation/preprocessing/binarize.py
imports: import numpy
  from sklearn_evaluation import validate
label_desc: Use image node_id 1 for calling a global function with example usage: cutoff_score_at_top_proportion(y_score, top_proportion) and returns: cutoff_value