code: def test_mad_axis_none():
      # GH 7027
      a = np.array([[0, 1, 2], [2, 3, 2]])
  
      def m(x):
          return np.median(x)
  
      direct = mad(a=a, axis=None)
      custom = mad(a=a, axis=None, center=m)
      axis0 = mad(a=a.ravel(), axis=0)
  
      np.testing.assert_allclose(direct, custom)
      np.testing.assert_allclose(direct, axis0)
  
imports: import numpy
  from numpy.random import standard_normal
  from numpy.testing import assert_almost_equal, assert_equal
  import pytest
  from scipy.stats import norm
  import statsmodels.api
  import statsmodels.robust.scale
  from statsmodels.robust.scale import mad
label_desc: Use image node_id 1 for calling a global function with example usage: test_mad_axis_none() and returns: np