def set_current_theme(identifier):
 cache.bump_version(THEME_CACHE_KEY)
 theme = get_theme_by_identifier(identifier)
 if (not theme):
  raise ValueError('Invalid theme identifier')
 theme.set_current()
 cache.set(THEME_CACHE_KEY, theme)
 return theme

def set_current_theme ( identifier ) : cache . bump_version ( THEME_CACHE_KEY ) theme = get_theme_by_identifier ( identifier ) if ( not theme ) : raise ValueError ( 'Invalid theme identifier' ) theme . set_current ( ) cache . set ( THEME_CACHE_KEY , theme ) return theme
activate a theme based on identifier .