<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save(self, p_todolist):
 """ Saves a tuple with archive, todolist and command with its arguments into the backup file with unix timestamp as the key. Tuple is then indexed in backup file with combination of hash calculated from p_todolist and unix timestamp. Backup file is closed afterwards. """

        self._trim()

        current_hash = hash_todolist(p_todolist)
        list_todo = (self.todolist.print_todos()+'\n').splitlines(True)
        try:
            list_archive = (self.archive.print_todos()+'\n').splitlines(True)
        except AttributeError:
            list_archive = []

        self.backup_dict[self.timestamp] = (list_todo, list_archive,  self.label)

        index = self._get_index()
        index.insert(0, (self.timestamp, current_hash))
        self._save_index(index)

        self._write()
        self.close()