<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _fetch_3ss_fasta(fasta, gene_name, exon_num, chrom, strand, start, end):
 """Retreives the 3' SS sequence flanking the specified exon. Returns a string in fasta format with the first line containing a ">" and the second line contains the two base pairs of 3' SS. Parameters fasta : pysam.Fastafile fasta object from pysam gene_name : str gene name used for fasta seq id exon_num : int the `exon_num` exon, used for seq id chrom : str chromsome strand : str strand, {'+', '-'} start : int 0-based start position end : int 0-based end position Returns ------- ss_fasta : str string in fasta format with first line being seq id """


    if strand == '-':
        ss_seq = fasta.fetch(reference=chrom,
                             start=end-1,
                             end=end+3)
        ss_seq = utils.rev_comp(ss_seq)
    elif strand == '+':
        ss_seq = fasta.fetch(reference=chrom,
                             start=start-3,
                             end=start+1)
    ss_fasta = '>{0};exon{1};3SS\n{2}\n'.format(gene_name,
                                                exon_num,
                                                ss_seq.upper())
    return ss_fasta