  def backoff(retries):
    return random.randrange(0, min(128, int(2 ** retries)))
  
  
  def manage_tokens(api):
    if not TICI:
      return
  
    try:
      params = Params()
      mapbox = api.get(f"/v1/tokens/mapbox/{api.dongle_id}/", timeout=5.0, access_token=api.get_token())
      if mapbox.status_code == 200:
        params.put("MapboxToken", mapbox.json()["token"])
      else:
        params.delete("MapboxToken")
    except Exception:
      cloudlog.exception("Failed to update tokens")
  
  
  def main():
    params = Params()
    dongle_id = params.get("DongleId", encoding='utf-8')
  
    ws_uri = ATHENA_HOST + "/ws/v2/" + dongle_id
 
</s> remove   dongle_id = Params().get("DongleId", encoding='utf-8')
  api = Api(dongle_id)
  manage_tokens(api)
 </s> add 
  def backoff(retries):
    return random.randrange(0, min(128, int(2 ** retries)))
  
  















  def main():
    params = Params()
    dongle_id = params.get("DongleId", encoding='utf-8')
  
    ws_uri = ATHENA_HOST + "/ws/v2/" + dongle_id
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 navigation: use mapbox proxy server (#22660)

* use mapbox proxy

* remove MapboxToken param

* do not log jwt

* remove import

* move to staging url

* put has_prime in ui state

* logic was flipped

* Update selfdrive/ui/qt/maps/map.h 
selfdrive/athena/athenad.py