code: def _weighted_spearman(y, y_pred, w):
      """Calculate the weighted Spearman correlation coefficient."""
      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)
  
file_path: gplearn/gplearn/fitness.py
imports: import numbers
  import numpy
  from joblib import wrap_non_picklable_objects
  from scipy.stats import rankdata
label_desc: Use image node_id 3 for calling a global function with example usage: _weighted_spearman(y, y_pred, w) and returns: _weighted_pearson