<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prepare_samples(job, patient_dict, univ_options):
 """ Obtain the input files for the patient and write them to the file store. :param dict patient_dict: The input fastq dict patient_dict: |- 'tumor_dna_fastq_[12]' OR 'tumor_dna_bam': str |- 'tumor_rna_fastq_[12]' OR 'tumor_rna_bam': str |- 'normal_dna_fastq_[12]' OR 'normal_dna_bam': str |- 'mutation_vcf': str |- 'hla_haplotype_files': str +- 'patient_id': str :param dict univ_options: Dict of universal options used by almost all tools :return: Updated fastq dict output_dict: |- 'tumor_dna_fastq_[12]' OR 'tumor_dna_bam': fsID |- 'tumor_rna_fastq_[12]' OR 'tumor_rna_bam': fsID |- 'normal_dna_fastq_[12]' OR 'normal_dna_bam': fsID |- 'mutation_vcf': fsID |- 'hla_haplotype_files': fsId +- 'patient_id': str :rtype: dict """

    job.fileStore.logToMaster('Downloading Inputs for %s' % univ_options['patient'])
    # For each sample type, check if the prefix is an S3 link or a regular file
    # Download S3 files.
    output_dict = {}
    for input_file in patient_dict:
        if not input_file.endswith(('bam', 'bai', '_1', '_2', 'files', 'vcf', 'bedpe')):
            output_dict[input_file] = patient_dict[input_file]
            continue
        output_dict[input_file] = get_pipeline_inputs(
            job, ':'.join([univ_options['patient'], input_file]), patient_dict[input_file],
            encryption_key=(univ_options['sse_key'] if patient_dict['ssec_encrypted'] else None),
            per_file_encryption=univ_options['sse_key_is_master'],
            gdc_download_token=univ_options['gdc_download_token'])
    return output_dict