code: def set_default(nick, location, session, send, apikey):
      
      if valid_location(location, apikey):
          send("Setting default location")
          default = session.query(Weather_prefs).filter(Weather_prefs.nick == nick).first()
          if default is None:
              default = Weather_prefs(nick=nick, location=location)
              session.add(default)
          else:
              default.location = location
      else:
          send("Invalid or Ambiguous Location")
docs: Sets nick's default location to location.