<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _assert_git_repo(target):
 """ Asserts that a given target directory is a git repository """

        hooks_dir = os.path.abspath(os.path.join(target, HOOKS_DIR_PATH))
        if not os.path.isdir(hooks_dir):
            raise GitHookInstallerError(u"{0} is not a git repository.".format(target))