code: def _get_scores_labels_and_counts(data):
      """Order samples by scores, counting number of positive, negative, and overall samples.
  
      The samples are sorted into descending order.
  
      :param data: the DataFrame containing scores and labels
      :type data: pandas.DataFrame
      :return: a tuple containing the sorted scores, labels, the number of samples, the number
          of positive samples, and the number of negative samples
      :rtype: tuple of list, list, int, int, int
      """
      data_sorted = data.sort_values(by=SCORE_KEY, ascending=False)
  
      scores = list(data_sorted[SCORE_KEY])
      labels = list(data_sorted[LABEL_KEY])
  
      n, n_positive, n_negative = _get_counts(labels)
  
      return scores, labels, n, n_positive, n_negative
  
file_path: fairlearn/fairlearn/postprocessing/_tradeoff_curve_utilities.py
imports: import numpy
  import pandas
  from sklearn.utils import Bunch
  from ._constants import LABEL_KEY, P0_KEY, P1_KEY, SCORE_KEY
  from ._threshold_operation import ThresholdOperation
label_desc: Use image node_id 6 for calling a global function with example usage: _get_scores_labels_and_counts(data) and returns: scores,  labels,  n,  n_positive,  n_negative