def increment_version(version):
    """Increments an androidx SemVer version.

    If the version is alpha or beta, the suffix is simply incremented.
    Otherwise, it chooses the next minor version.

    Args:
        version: the version to be incremented.

    Returns:
        The incremented version.
    """
    if "alpha" in version or "beta" in version:
        version_prerelease_suffix = version[-2:]
        new_version_prerelease_suffix = int(version_prerelease_suffix) + 1
        new_version = version[:-2] + "%02d" % (new_version_prerelease_suffix,)
    else:
        version_minor = version.split(".")[1]
        new_version_minor = str(int(version_minor) + 1)
        new_version = version.split(".")[0] + "." + new_version_minor + ".0-alpha01"
    return new_version