<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def identify_raw_files(task: Task, test_mode: bool = False) -> List[str]: """ Identify raw files that need to be downloaded for a given task. :param task: Sequence-to-sequence task. :param test_mode: Run in test mode, only downloading test data. :return: List of raw file names. """

    raw_files = set()
    all_sets = [task.test,] if test_mode else [task.train, task.dev, task.test]
    for file_sets in all_sets:
        for file_set in file_sets:
            for fname in file_set[:2]:
                raw_file = fname.split("/", 1)[0]
                if raw_file not in RAW_FILES:
                    raise RuntimeError("Unknown raw file %s found in path %s" % (raw_file, fname))
                raw_files.add(raw_file)
    return sorted(raw_files)