def METHOD_NAME(a, axis=None, mask=None):
    """
    Find the absolute deviation from the median of a numpy array. If an axis is provided,
    then the median is calculated along the given axis.
    If mask is included, elements in a that have a non-zero mask value will be ignored.
    Parameters
    ----------
    a : float32 numpy array
        Input array to find the absolute deviation from the median.
    axis : int (default is None)
           Index of the array to take the median
    mask : unit8 or boolean numpy array (default is None)
          Numpy array of bitmask values. Non-zero values are ignored when calculating the median.
    Returns
    -------
    absdev : float32 numpy array
        The absolute deviation from the median. If axis is None, then we return a single float.
    Notes
    -----
    If all of the elements in the array are masked (or all of the elements of the axis of interest
    are masked), the original array is returned.
    """
    a_median = median(a, axis=axis, mask=mask)
    if axis is not None:
        a_median = np.expand_dims(a_median, axis=axis)
    return np.abs(a - a_median)