code: def median_absolute_deviation(X):
      """median absolute deviation for each variable in a segmented time series"""
      if hasattr(stats, "median_abs_deviation"):
          return stats.median_abs_deviation(X, axis=1)
      else:
          return stats.median_absolute_deviation(X, axis=1)
  
imports: import numpy
  from scipy import stats
label_desc: Use image node_id 14 for calling a global function with example usage: median_absolute_deviation(X) and returns: stats, stats