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

def _upstart_enable(name):
    '''
    Enable an Upstart service.
    '''
    if _upstart_is_enabled(name):
        return _upstart_is_enabled(name)
    override = '/etc/init/{0}.override'.format(name)
    files = ['/etc/init/{0}.conf'.format(name), override]
    for file_name in filter(os.path.isfile, files):
        with salt.utils.files.fopen(file_name, 'r+') as fp_:
            new_text = re.sub(r'^\s*manual\n?',
                              '',
                              salt.utils.stringutils.to_unicode(fp_.read()),
                              0,
                              re.MULTILINE)
            fp_.seek(0)
            fp_.write(
                salt.utils.stringutils.to_str(
                    new_text
                )
            )
            fp_.truncate()
    if os.access(override, os.R_OK) and os.path.getsize(override) == 0:
        os.unlink(override)
    return _upstart_is_enabled(name)