def METHOD_NAME(amounts, window_size=20):
    """
        Computes an array of local averages with a gliding window.
        https://stackoverflow.com/a/30141358
    """
    pd.Series(amounts).rolling(
        window=window_size).mean().iloc[window_size-1:].values