def METHOD_NAME(self, *args, **kwargs):
    try:
        assert self.test_dir is not None
        os.chdir(self.test_dir)
        return fn(self, *args, **kwargs)
    finally:
        # Restore the previous directory after execute fn
        os.chdir(previous_dir)