@contract
def mad(data):
    """ Calculate the Median Absolute Deviation from the data.

    :param data: The data to analyze.
     :type data: list(number)

    :return: The calculated MAD.
     :rtype: float
    """
    data_median = median(data)
    return float(median([abs(x - data_median) for x in data]))
dataset/ETHPy150Open beloglazov/openstack-neat/neat/locals/overload/statistics.py/mad/swapped operands of `-`