<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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}