code: def use_theme(theme, directory=None):
      
      repo = require_repo(directory)
      if theme not in list_themes(directory):
          raise ThemeNotFoundError(theme)
  
      old_theme = set_value(repo, 'theme', theme)
      return old_theme != theme
docs: Switches to the specified theme. This returns False if switching to the already active theme.