<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def done(self, index):
 """Handles the 'd' command. :index: Index of the item to mark as done. """

        if self.model.exists(index):
            self.model.edit(index, done=True)