<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_time(data):
 """And a friendly update time to the supplied data. Arguments: data (:py:class:`dict`):
 The response data and its update time. Returns: :py:class:`dict`: The data with a friendly update time. """

    payload = data['data']
    updated = data['updated'].date()
    if updated == date.today():
        payload['last_updated'] = data['updated'].strftime('today at %H:%M:%S')
    elif updated >= (date.today() - timedelta(days=1)):
        payload['last_updated'] = 'yesterday'
    elif updated >= (date.today() - timedelta(days=7)):
        payload['last_updated'] = updated.strftime('on %A')
    else:
        payload['last_updated'] = updated.strftime('%Y-%m-%d')
    return payload