def is_theme_dir(_dir):
 theme_sub_directories = {'lms', 'cms'}
 return bool((os.path.isdir(_dir) and theme_sub_directories.intersection(os.listdir(_dir))))

def is_theme_dir ( _dir ) : theme_sub_directories = { 'lms' , 'cms' } return bool ( ( os . path . isdir ( _dir ) and theme_sub_directories . intersection ( os . listdir ( _dir ) ) ) )
returns true if given dir contains theme overrides .