<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def confirm_checkout(dest: str, commit: str) -> bool: """ Confirm that git repository is checked out. :param dest: Local directory for checkout. :param commit: Git commit. :return: True if checkout is usable. """

    usable = False
    if os.path.exists(dest):
        try:
            rev = subprocess.check_output(["git", "rev-parse", "--verify", "HEAD"], cwd=dest).decode("utf-8").strip()
            usable = (rev == commit)
        except subprocess.CalledProcessError:
            pass
        if not usable:
            logging.info("Problem with %s, requires new checkout.", dest)
    return usable