def _get_latest_pkg_version(pkginfo):
    '''
    Returns the latest version of the package.
    Will return 'latest' or version number string, and
    'Not Found' if 'Not Found' is the only entry.
    '''
    if len(pkginfo) == 1:
        return next(six.iterkeys(pkginfo))
    try:
        return sorted(
            pkginfo,
            key=cmp_to_key(_reverse_cmp_pkg_versions)
        ).pop()
    except IndexError:
        return ''
def _get_latest_pkg_version ( pkginfo ) : if len ( pkginfo ) == 1 : return next ( six . iterkeys ( pkginfo ) ) try : return sorted ( pkginfo , key = cmp_to_key ( _reverse_cmp_pkg_versions ) ) . pop ( ) except IndexError : return ''
Returns the latest version of the package.
    Will return 'latest' or version number string, and
    'Not Found' if 'Not Found' is the only entry.