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

def receipts():
    '''
    Return the results of a call to
    ``system_profiler -xml -detail full SPInstallHistoryDataType``
    as a dictionary.  Top-level keys of the dictionary
    are the names of each set of install receipts, since
    there can be multiple receipts with the same name.
    Contents of each key are a list of dictionaries.

    CLI Example:

    .. code-block:: bash

        salt '*' systemprofiler.receipts
    '''

    apps = _call_system_profiler('SPInstallHistoryDataType')

    appdict = {}

    for a in apps:
        details = dict(a)
        details.pop('_name')
        if 'install_date' in details:
            details['install_date'] = details['install_date'].strftime('%Y-%m-%d %H:%M:%S')
        if 'info' in details:
            try:
                details['info'] = '{0}: {1}'.format(details['info'][0],
                                                    details['info'][1].strftime('%Y-%m-%d %H:%M:%S'))
            except (IndexError, AttributeError):
                pass

        if a['_name'] not in appdict:
            appdict[a['_name']] = []

        appdict[a['_name']].append(details)

    return appdict