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

def get_mpkg_ids(mpkg):
    '''
    Attempt to get the package IDs from a mounted .mpkg file

    Args:
        mpkg (str): The location of the mounted mpkg file

    Returns:
        list: List of package IDs

    CLI Example:

    .. code-block:: bash

        salt '*' macpackage.get_mpkg_ids /dev/disk2
    '''
    mpkg = _quote(mpkg)
    package_infos = []
    base_path = os.path.dirname(mpkg)

    # List all of the .pkg files
    cmd = 'find {0} -name *.pkg'.format(base_path)
    out = __salt__['cmd.run'](cmd, python_shell=True)

    pkg_files = out.split('\n')
    for p in pkg_files:
        package_infos.extend(get_pkg_id(p))

    return package_infos