<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flag_calcmad(data):
 """ Calculate median absolute deviation of data array """


    absdev = np.abs(data - np.median(data))
    return np.median(absdev)