code: def scores_at_top_proportion(y_score, top_proportion):
      """Binary scores by sorting them and grabbing a proportion from the top"""
      cutoff_score = cutoff_score_at_top_proportion(
          y_score, top_proportion
      )
      y_score_binary = np.array(y_score >= cutoff_score).astype(int)
      return y_score_binary
  
file_path: sklearn-evaluation/src/sklearn_evaluation/preprocessing/binarize.py
imports: import numpy
  from sklearn_evaluation import validate
label_desc: Use image node_id 4 for calling a global function with example usage: scores_at_top_proportion(y_score, top_proportion) and returns: y_score_binary