def METHOD_NAME(
    target_dir: str,
    cache_dir: str,
    dataset_root: str,
    get_path_only: bool = False,
):
    target_dir = Path(target_dir)
    resample_hear_corpus(dataset_root, target_sr=16000)
    dataset_root = Path(dataset_root)
    wav_root: Path = dataset_root / "16000"
    train_csv = target_dir / "train.csv"
    valid_csv = target_dir / "valid.csv"
    test_csv = target_dir / "test_csv"
    if get_path_only:
        return train_csv, valid_csv, [test_csv]
    def load_json(filepath):
        with open(filepath, "r") as fp:
            return json.load(fp)
    def split_to_df(split: str) -> pd.DataFrame:
        meta = load_json(dataset_root / f"{split}.json")
        data = defaultdict(list)
        for k in list(meta.keys()):
            data["id"].append(k)
            data["wav_path"].append(wav_root / split / k)
            data["labels"].append(" ; ".join([str(label).strip() for label in meta[k]]))
        return pd.DataFrame(data=data)
    split_to_df("train").to_csv(train_csv, index=False)
    split_to_df("valid").to_csv(valid_csv, index=False)
    split_to_df("test").to_csv(test_csv, index=False)
    return train_csv, valid_csv, [test_csv]