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

def write_bsedebug(basis):
    '''Converts a basis set to BSE Debug format
    '''

    s = ''

    for el, eldata in basis['elements'].items():
        s += element_data_str(el, eldata)
    return s