<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, action: torch.Tensor) -> 'ChecklistStatelet': """ Takes an action index, updates checklist and returns an updated state. """

        checklist_addition = (self.terminal_actions == action).float()
        new_checklist = self.checklist + checklist_addition
        new_checklist_state = ChecklistStatelet(terminal_actions=self.terminal_actions,
                                                checklist_target=self.checklist_target,
                                                checklist_mask=self.checklist_mask,
                                                checklist=new_checklist,
                                                terminal_indices_dict=self.terminal_indices_dict)
        return new_checklist_state