code: def test_mean_prediction_weighted():
      y_pred = [0, 1, 2, 3, 4]
      y_true = None
      weight = [8, 2, 1, 2, 1]
  
      result = metrics.mean_prediction(y_true, y_pred, weight)
  
      assert result == 1
  
imports: import fairlearn.metrics
label_desc: Use image node_id 3 for calling a global function with example usage: test_mean_prediction_weighted() without return types