def get_theme_chain(theme, themes_dirs):
 themes = [get_theme_path_real(theme, themes_dirs)]
 while True:
  parent = get_parent_theme_name(themes[(-1)], themes_dirs=themes_dirs)
  if ((parent is None) or (parent in themes)):
   break
  themes.append(parent)
 return themes

def get_theme_chain ( theme , themes_dirs ) : themes = [ get_theme_path_real ( theme , themes_dirs ) ] while True : parent = get_parent_theme_name ( themes [ ( - 1 ) ] , themes_dirs = themes_dirs ) if ( ( parent is None ) or ( parent in themes ) ) : break themes . append ( parent ) return themes
create the full theme inheritance chain including paths .