code: def test_max_error():
      predictions = pd.Series([1.0, 2.0, 3.0])
      targets = pd.Series([3.0, 2.0, 1.0])
      result = max_error().eval_fn(predictions, targets, {})
      assert result.aggregate_results["max_error"] == 2.0
  
imports: from unittest import mock
  import pandas
  import pytest
  from mlflow.metrics import MetricValue, ari_grade_level, exact_match, f1_score, flesch_kincaid_grade_level, mae, mape, max_error, mse, ndcg_at_k, precision_at_k, precision_score, r2_score, recall_at_k, recall_score, rmse, rouge1, rouge2, rougeL, rougeLsum, toxicity
label_desc: Use image node_id 16 for calling a global function with example usage: test_max_error() without return types