code: def _mean_square_error(y, y_pred, w):
      """Calculate the mean square error."""
      return np.average(((y_pred - y) ** 2), weights=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 5 for calling a global function with example usage: _mean_square_error(y, y_pred, w) and returns: np