<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(gandi, ip, reverse, background):
 """Update an ip."""

    if not reverse:
        return
    return gandi.ip.update(ip, {'reverse': reverse}, background)