<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_prev_button(self, event):
 """ update figures and text when a previous button is selected """

        if 'saved' not in self.Data[self.s]['pars'] or self.Data[self.s]['pars']['saved'] != True:
            # check preferences
            if self.auto_save.GetValue():
                self.on_save_interpretation_button(None)
            else:
                del self.Data[self.s]['pars']
                self.Data[self.s]['pars'] = {}
                self.Data[self.s]['pars']['lab_dc_field'] = self.Data[self.s]['lab_dc_field']
                self.Data[self.s]['pars']['er_specimen_name'] = self.Data[self.s]['er_specimen_name']
                self.Data[self.s]['pars']['er_sample_name'] = self.Data[self.s]['er_sample_name']
                # return to last saved interpretation if exist
                if 'er_specimen_name' in list(self.last_saved_pars.keys()) and self.last_saved_pars['er_specimen_name'] == self.s:
                    for key in list(self.last_saved_pars.keys()):
                        self.Data[self.s]['pars'][key] = self.last_saved_pars[key]
                    self.last_saved_pars = {}

        index = self.specimens.index(self.s)
        if index == 0:
            index = len(self.specimens)
        index -= 1
        self.s = self.specimens[index]
        self.specimens_box.SetStringSelection(self.s)
        self.update_selection()