<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _next_grav_gsa(grav_initial, grav_reduction_rate, iteration, max_iterations):
 """Calculate G as given by GSA algorithm. In GSA paper, grav is G """

    return grav_initial * math.exp(
        -grav_reduction_rate * iteration / float(max_iterations))