<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def git_working_dir(func):
 """Decorator which changes the current working dir to the one of the git repository in order to assure relative paths are handled correctly"""


    @wraps(func)
    def set_git_working_dir(self, *args, **kwargs):
        cur_wd = os.getcwd()
        os.chdir(self.repo.working_tree_dir)
        try:
            return func(self, *args, **kwargs)
        finally:
            os.chdir(cur_wd)
        # END handle working dir
    # END wrapper

    return set_git_working_dir