code: def mean_absolute_error(
      x: JaxArray,
      y: JaxArray,
      keep_axis: Optional[Iterable[int]] = (0,),
  ) -> JaxArray:
      """Computes the mean absolute error between x and y.
  
      Args:
          x: a tensor of shape (d0, .. dN-1).
          y: a tensor of shape (d0, .. dN-1).
          keep_axis: a sequence of the dimensions to keep, use `None` to return a scalar value.
  
      Returns:
          tensor of shape (d_i, ..., for i in keep_axis) containing the mean absolute error.
      """
  
      FUNC_NAME = "mean_absolute_error"
      if x.shape != y.shape:
          warnings.warn(
              " {} {} : arg1 {} and arg2 {}".format(
                  WARN_SHAPE_MISMATCH, FUNC_NAME, x.shape, y.shape
              )
          )
      loss = jn.abs(x - y)
      axis = [i for i in range(loss.ndim) if i not in (keep_axis or ())]
      return loss.mean(axis)
  
file_path: objax/objax/functional/loss.py
imports: from typing import Union, Iterable, Optional
  import jax.numpy
  from objax.functional.core import logsumexp
  from objax.typing import JaxArray
  import warnings
label_desc: Use image node_id 4 for calling a global function with example usage: mean_absolute_error(x, y, keep_axis) and returns: loss