def _find_extra_valid_paths(dataset_path: str) -> set:
    paths = utils.split_paths(dataset_path)
    all_valid_paths = set()
    for sub_dir in paths:
        contents = PathManager.ls(sub_dir)
        valid_paths = [c for c in contents if (re.match('valid*[0-9].*', c) is not None)]
        all_valid_paths |= {os.path.basename(p) for p in valid_paths}
    roots = {os.path.splitext(p)[0] for p in all_valid_paths}
    return roots
def _find_extra_valid_paths(dataset_path: str) -> set:
    paths = utils.split_paths(dataset_path)
    all_valid_paths = set()
    for sub_dir in paths:
        contents = PathManager.ls(sub_dir)
        valid_paths = [c for c in contents if (re.match('valid*[0-9].*', c) is not None)]
        all_valid_paths |= {os.path.basename(p) for p in valid_paths}
    roots = {os.path.splitext(p)[0] for p in all_valid_paths}
    return roots