<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_sample_file(data, out_dir):
 """from data list all the fastq files in a file"""

    sample_file = os.path.join(out_dir, "sample_file.txt")
    with open(sample_file, 'w') as outh:
        for sample in data:
            outh.write(sample[0]["clean_fastq"] + "\n")
    return sample_file