code: def max_error(y_true, y_pred):
      """
      The max_error metric calculates the maximum residual error.
  
      Read more in the :ref:`User Guide <max_error>`.
  
      Parameters
      ----------
      y_true : array-like of shape (n_samples,)
          Ground truth (correct) target values.
  
      y_pred : array-like of shape (n_samples,)
          Estimated target values.
  
      Returns
      -------
      max_error : float
          A positive floating point value (the best value is 0.0).
  
      Examples
      --------
      >>> from sklearn.metrics import max_error
      >>> y_true = [3, 2, 7, 1]
      >>> y_pred = [4, 2, 7, 1]
      >>> max_error(y_true, y_pred)
      1
      """
      y_type, y_true, y_pred, _ = _check_reg_targets(
          y_true, y_pred, None
      )
      if y_type == "continuous-multioutput":
          raise ValueError("Multioutput not supported in max_error")
      return np.max(np.abs(y_true - y_pred))
  
imports: import warnings
  from numbers import Real
  import numpy
  from scipy.special import xlogy
  from ..exceptions import UndefinedMetricWarning
  from ..utils._param_validation import Interval, StrOptions, validate_params
  from ..utils.stats import _weighted_percentile
  from ..utils.validation import _check_sample_weight, _num_samples, check_array, check_consistent_length, column_or_1d
label_desc: Use image node_id 11 for calling a global function with example usage: max_error(y_true, y_pred) and returns: np