def METHOD_NAME() -> None:
    commit_id = get_commit_id()
    output = subprocess.check_output(["git", "branch", "-r", "--contains", commit_id])
    branches = map(str.strip, output.decode("utf-8").split("\n"))
    if not any(
        branch == "origin/main" or branch.startswith("origin/release/") for branch in branches
    ):
        raise RuntimeError("could not find commit %s on the remote" % commit_id)