code: def test_maximum_absolute_error():
      a = np.random.randn(4)
      b = np.random.randn(4)
      c = np.random.randn(4)
      d = np.random.randn(4)
      ground_truth = np.random.randn(4)
  
      m = MaximumAbsoluteError()
  
      np_ans = -1
  
      m.update((torch.from_numpy(a), torch.from_numpy(ground_truth)))
      np_max = np.max(np.abs((a - ground_truth)))
      np_ans = np_max if np_max > np_ans else np_ans
      assert m.compute() == pytest.approx(np_ans)
  
      m.update((torch.from_numpy(b), torch.from_numpy(ground_truth)))
      np_max = np.max(np.abs((b - ground_truth)))
      np_ans = np_max if np_max > np_ans else np_ans
      assert m.compute() == pytest.approx(np_ans)
  
      m.update((torch.from_numpy(c), torch.from_numpy(ground_truth)))
      np_max = np.max(np.abs((c - ground_truth)))
      np_ans = np_max if np_max > np_ans else np_ans
      assert m.compute() == pytest.approx(np_ans)
  
      m.update((torch.from_numpy(d), torch.from_numpy(ground_truth)))
      np_max = np.max(np.abs((d - ground_truth)))
      np_ans = np_max if np_max > np_ans else np_ans
      assert m.compute() == pytest.approx(np_ans)
  
imports: import os
  import numpy
  import pytest
  import torch
  import ignite.distributed
  from ignite.contrib.metrics.regression import MaximumAbsoluteError
  from ignite.engine import Engine
  from ignite.exceptions import NotComputableError
label_desc: Use image node_id 3 for calling a global function with example usage: test_maximum_absolute_error() without return types