def METHOD_NAME(path, found_dirs=None):
    """Recursively searches for 'ui' directories and returns their paths as a list."""
    if found_dirs is None:
        found_dirs = list()
    for entry in os.scandir(path):
        if entry.is_dir():
            if entry.name == 'ui':
                found_dirs.append(entry.path)
            else:
                METHOD_NAME(entry.path, found_dirs)
    return found_dirs