def get_theme_base_dirs(theme, theme_dirs):
 theme_paths = []
 for _dir in theme_dirs:
  for dir_name in {theme}.intersection(os.listdir(_dir)):
   if is_theme_dir((Path(_dir) / dir_name)):
    theme_paths.append((Path(_dir) / dir_name))
 return theme_paths

def get_theme_base_dirs ( theme , theme_dirs ) : theme_paths = [ ] for _dir in theme_dirs : for dir_name in { theme } . intersection ( os . listdir ( _dir ) ) : if is_theme_dir ( ( Path ( _dir ) / dir_name ) ) : theme_paths . append ( ( Path ( _dir ) / dir_name ) ) return theme_paths
get all base dirs where the given theme can be found .