'Return True/False to indicate whether to show the "Reset" button.'

def should_show_reset_button(self):

    is_survey_question = (self.max_attempts == 0)
    if (self.closed() and (not is_survey_question)):
        return False
    if ((self.rerandomize in [RANDOMIZATION.ALWAYS, RANDOMIZATION.ONRESET]) and self.is_submitted()):
        return True
    elif self.is_correct():
        return False
    else:
        return self.show_reset_button
