def check_version(max_versions, version):
    if (b'_' in version):
        (lib, _, ver) = version.rpartition(b'_')
    else:
        lib = version
        ver = '0'
    ver = tuple([int(x) for x in ver.split(b'.')])
    if (not (lib in max_versions)):
        return False
    return (ver <= max_versions[lib])
def check_version(max_versions, version):
    if (b'_' in version):
        (lib, _, ver) = version.rpartition(b'_')
    else:
        lib = version
        ver = '0'
    ver = tuple([int(x) for x in ver.split(b'.')])
    if (not (lib in max_versions)):
        return False
    return (ver <= max_versions[lib])