<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def linear_weights(i, n):
 """A window function that falls off arithmetically. This is used to calculate a weighted moving average (WMA) that gives higher weight to changes near the point being analyzed, and smooth out changes at the opposite edge of the moving window. See bug 879903 for details. """

    if i >= n:
        return 0.0
    return float(n - i) / float(n)