<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def refresh_token(token_service, refresh_token, client_id, client_secret):
 """Refreshes a token."""

  data = {
    'client_id': client_id,
    'client_secret': client_secret,
    'refresh_token': refresh_token,
    'grant_type': 'refresh_token',
  }
  resp = requests.post(token_service, data)
  print resp, 'refreshing', resp.json()
  return resp.json()