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

def download_software_file(filename=None, synch=False):
    '''
    Download software packages by filename.

    Args:
        filename(str): The filename of the PANOS file to download.

        synch (bool): If true then the file will synch to the peer unit.

    CLI Example:

    .. code-block:: bash

        salt '*' panos.download_software_file PanOS_5000-8.0.0
        salt '*' panos.download_software_file PanOS_5000-8.0.0 True

    '''
    if not filename:
        raise CommandExecutionError("Filename option must not be none.")

    if not isinstance(synch, bool):
        raise CommandExecutionError("Synch option must be boolean..")

    if synch is True:
        query = {'type': 'op',
                 'cmd': '<request><system><software><download>'
                        '<file>{0}</file></download></software></system></request>'.format(filename)}
    else:
        query = {'type': 'op',
                 'cmd': '<request><system><software><download><sync-to-peer>yes</sync-to-peer>'
                        '<file>{0}</file></download></software></system></request>'.format(filename)}

    return _get_job_results(query)