<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mad(self,x, axis=None):
 """median absolute deviation statistic"""

        return np.median(np.abs(x - np.median(x, axis)), axis)