'format the package data into something that can be presented'

@staticmethod
def process_versions(query_output):

    version_dict = defaultdict(dict)
    for version in query_output.decode().split('\n'):
        pkg_info = version.split('|')
        pkg_version = {}
        pkg_version['version'] = pkg_info[0]
        pkg_version['release'] = pkg_info[1]
        pkg_version['arch'] = pkg_info[2]
        pkg_version['repo'] = pkg_info[3]
        pkg_version['version_release'] = pkg_info[4]
        version_dict[pkg_info[4]] = pkg_version
    return version_dict
