<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def average_price(quantity_1, price_1, quantity_2, price_2):
 """Calculates the average price between two asset states."""

    return (quantity_1 * price_1 + quantity_2 * price_2) / \
            (quantity_1 + quantity_2)