code: def _create_sample_file(data, out_dir):
      
      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
docs: from data list all the fastq files in a file