<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def five_resect(dna, n_bases):
    '''Remove bases from 5' end of top strand.

    :param dna: Sequence to resect.
    :type dna: coral.DNA
    :param n_bases: Number of bases cut back.
    :type n_bases: int
    :returns: DNA sequence resected at the 5' end by n_bases.
    :rtype: coral.DNA

    '''
    new_instance = dna.copy()
    if n_bases >= len(dna):
        new_instance.top.seq = ''.join(['-' for i in range(len(dna))])
    else:
        new_instance.top.seq = '-' * n_bases + str(dna)[n_bases:]

    new_instance = _remove_end_gaps(new_instance)

    return new_instance