code: def _weighted_spearman(y, y_pred, w):
      
      y_pred_ranked = np.apply_along_axis(rankdata, 0, y_pred)
      y_ranked = np.apply_along_axis(rankdata, 0, y)
      return _weighted_pearson(y_pred_ranked, y_ranked, w)
docs: Calculate the weighted Spearman correlation coefficient.