code: def pick_theme(manual):
      
      if manual:
          return manual
      pref_init()
      parser = cp.ConfigParser()
      parser.read(PREFS_FILE)
      try:
          theme = parser.get("theme", "default")
      except (cp.NoSectionError, cp.NoOptionError):
          theme = "plain"
      return theme
docs: Return theme name based on manual input, prefs file, or default to "plain".