code: def test_mae(self):
      mae = MAE()
  
      self.assertEqual(mae.type, "rating")
      self.assertEqual(mae.name, "MAE")
  
      self.assertEqual(0, mae.compute(np.asarray([0]), np.asarray([0])))
      self.assertEqual(
          1, mae.compute(np.asarray([0, 1]), np.asarray([1, 0]))
      )
      self.assertEqual(
          2,
          mae.compute(
              np.asarray([0, 1]), np.asarray([2, 3]), np.asarray([1, 3])
          ),
      )
  
file_path: cornac/tests/cornac/metrics/test_rating.py
imports: import unittest
  import numpy
  from cornac.metrics.rating import RatingMetric
  from cornac.metrics import RMSE
  from cornac.metrics import MAE
  from cornac.metrics import MSE
label_desc: Use image node_id 2 for calling the TestRating obj's underlying member method code with example usage: obj.test_mae() without return types