def latest_executeble(versions_dir, base_build=None):
    latest = None
    if (base_build is not None):
        with suppress(ValueError):
            latest = (int(base_build[4:]), max((p for p in versions_dir.iterdir() if (p.is_dir() and p.name.startswith(str(base_build))))))
    if ((base_build is None) or (latest is None)):
        latest = max(((int(p.name[4:]), p) for p in versions_dir.iterdir() if (p.is_dir() and p.name.startswith('Base'))))
    (version, path) = latest
    if (version < 55958):
        logger.critical('Your SC2 binary is too old. Upgrade to 3.16.1 or newer.')
        sys.exit(1)
    return (path / BINPATH[PF])
def latest_executeble(versions_dir, base_build=None):
    latest = None
    if (base_build is not None):
        with suppress(ValueError):
            latest = (int(base_build[4:]), max((p for p in versions_dir.iterdir() if (p.is_dir() and p.name.startswith(str(base_build))))))
    if ((base_build is None) or (latest is None)):
        latest = max(((int(p.name[4:]), p) for p in versions_dir.iterdir() if (p.is_dir() and p.name.startswith('Base'))))
    (version, path) = latest
    if (version < 55958):
        logger.critical('Your SC2 binary is too old. Upgrade to 3.16.1 or newer.')
        sys.exit(1)
    return (path / BINPATH[PF])