<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_token(key, payload):
 """Auth token generator payload should be a json encodable data structure """

  token = hmac.new(key)
  token.update(json.dumps(payload))
  return token.hexdigest()