<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset(self):
 """ Resets index by removing index directory. """

        if os.path.exists(self.index_dir):
            rmtree(self.index_dir)
        self.index = None