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

def _parse_top_cfg(content, filename):
    '''
    Allow top_cfg to be YAML
    '''
    try:
        obj = salt.utils.yaml.safe_load(content)
        if isinstance(obj, list):
            log.debug('MakoStack cfg `%s` parsed as YAML', filename)
            return obj
    except Exception as err:
        pass
    log.debug('MakoStack cfg `%s` parsed as plain text', filename)
    return content.splitlines()