code: def concordance_index(
      y_true: np.ndarray, y_pred: np.ndarray
  ) -> float:
      """Compute Concordance index.
  
      Statistical metric indicates the quality of the predicted ranking.
      Please confirm details from [1]_.
  
      Parameters
      ----------
      y_true: np.ndarray
          continous value
      y_pred: np.ndarray
          Predicted value
  
      Returns
      -------
      float
          score between [0,1]
  
      References
      ----------
      .. [1] Steck, Harald, et al. "On ranking in survival analysis:
        Bounds on the concordance index." Advances in neural information processing systems (2008): 1209-1216.
      """
  
      idx = np.argsort(y_true)
      y_true = y_true[idx]
      y_pred = y_pred[idx]
  
      pairs = 0
      correct_pairs = 0.0
  
      for i in range(len(y_true)):
          true_a = y_true[i]
          pred_a = y_pred[i]
  
          for j in range(i + 1, len(y_true)):
              true_b = y_true[j]
              pred_b = y_pred[j]
              if true_a != true_b:
                  pairs += 1
                  if pred_a == pred_b:
                      correct_pairs += 0.5
                  elif pred_a < pred_b:
                      correct_pairs += true_a < true_b
                  else:
                      correct_pairs += true_a > true_b
  
      assert pairs > 0, "No pairs for comparision"
  
      return correct_pairs / pairs
  
imports: import numpy
  import scipy.stats
  from sklearn.metrics import matthews_corrcoef
  from sklearn.metrics import recall_score
  from sklearn.metrics import cohen_kappa_score
  from sklearn.metrics import r2_score
  from sklearn.metrics import mean_squared_error
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import precision_score
  from sklearn.metrics import precision_recall_curve
  from sklearn.metrics import auc
  from sklearn.metrics import jaccard_score
  from sklearn.metrics import f1_score
  from sklearn.metrics import roc_auc_score
  from sklearn.metrics import accuracy_score
  from sklearn.metrics import balanced_accuracy_score
  from sklearn.metrics import top_k_accuracy_score
label_desc: Use image node_id 9 for calling a global function with example usage: concordance_index(y_true, y_pred) and returns: unknown