<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_patient_bams(job, patient_dict, sample_type, univ_options, bwa_options, mutect_options):
 """ Convenience function to return the bam and its index in the correct format for a sample type. :param dict patient_dict: dict of patient info :param str sample_type: 'tumor_rna', 'tumor_dna', 'normal_dna' :param dict univ_options: Dict of universal options used by almost all tools :param dict bwa_options: Options specific to bwa :param dict bwa_options: Options specific to mutect :return: formatted dict of bam and bai :rtype: dict """

    output_dict = {}
    if 'dna' in sample_type:
        sample_info = 'fix_pg_sorted'
        prefix = sample_type + '_' + sample_info
    else:
        sample_info = 'genome_sorted'
        prefix = 'rna_' + sample_info
    if sample_type + '_bam' in patient_dict['gdc_inputs']:
        output_dict[prefix + '.bam'] = patient_dict[sample_type + '_bam'][0]
        output_dict[prefix + '.bam.bai'] = patient_dict[sample_type + '_bam'][1]
    elif sample_type + '_bai' in patient_dict:
        output_dict[prefix + '.bam'] = patient_dict[sample_type + '_bam']
        output_dict[prefix + '.bam.bai'] = patient_dict[sample_type + '_bai']
    else:
        from protect.alignment.dna import index_bamfile, index_disk
        output_job = job.wrapJobFn(index_bamfile, patient_dict[sample_type + '_bam'],
                                   'rna' if sample_type == 'tumor_rna' else sample_type,
                                   univ_options, bwa_options['samtools'],
                                   sample_info=sample_info, export=False,
                                   disk=PromisedRequirement(index_disk,
                                                            patient_dict[sample_type + '_bam']))
        job.addChild(output_job)
        output_dict = output_job.rv()
    if sample_type == 'tumor_rna':
        if 'tumor_rna_transcriptome_bam' not in patient_dict:
            patient_dict['tumor_rna_transcriptome_bam'] = None
        return{'rna_genome': output_dict,
               'rna_transcriptome.bam': patient_dict['tumor_rna_transcriptome_bam']}
    else:
        return output_dict