docs: def get_preferences(self, user=None):
          """Return a string->value dictionnary representing the given user
          preferences.
  
          If no user is provided, the current user is used instead.
          """
          if user is None:
              user = current_user
          return {pref.key: pref.value for pref in user.preferences}