This function assumes modifying `attempt` will change the stored state of the task `self`. That's a bad assumption. Instead, I would recommend re-writing this function to loop through `self.child_history` and update that (locally, inside this class). I'd also suggest that rather than mutating child_history, you write it so that it generates a new list, and then updates `child_history` with the new list.

Finally, I would call this function (to normalize the task) inside a normalization function in combined_open_ended_modulev1, that in turn gets called on `task_states` in line 311. That way, we will have fixed the scores before we use those scores to decide which historical task state the student did best with.