<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_theme(self, theme):
 """ Pick a palette from the list of supported THEMES. :param theme: The name of the theme to set. """

        if theme in THEMES:
            self.palette = THEMES[theme]
            if self._scroll_bar:
                # TODO: fix protected access.
                self._scroll_bar._palette = self.palette