code: def mae(
      x: Tensor,
      y: Tensor,
      test_func: Callable,
      mean_dim: Optional[int] = 0,
  ) -> np.ndarray:
      return _to_numpy_single(
          abs(test_func(x).mean(mean_dim) - test_func(y).mean(mean_dim))
      )
  
file_path: torchsde/diagnostics/utils.py
imports: import itertools
  import os
  import random
  import matplotlib.pyplot
  import numpy
  import torch
  from scipy import stats
  from torchsde.types import Optional, Tensor, Sequence, Union, Callable
label_desc: Use image node_id 4 for calling a global function with example usage: mae(x, y, test_func, mean_dim) and returns: _to_numpy_single