def checkout(path, ref):
    command = ['git', 'checkout', ref]
    return_code = _process(command, chdir=path)
    if return_code:
        log.error("Checking out '%s' failed", ref)
        raise IOError("Unable to checkout '%s'" % (ref, ))
    return True
Check out `ref` in the repo located on `path`
dataset/ETHPy150Open markstory/lint-review/lintreview/git.py/checkout