def METHOD_NAME(remote: str, branch: str, update_cmd: str) -> None:
    run(['git', 'fetch', remote, f'refs/heads/{branch}'])
    try:
        run(['git', 'merge-base', '--is-ancestor', 'FETCH_HEAD', 'HEAD'])
    except Exception as err:
        print(f"HEAD is not up-to-date with '{remote}' '{branch}':")
        print("You need to update it with:")
        print()
        print(f"    $ {update_cmd}")
        print()
        raise