<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def right_click_specimen_equalarea(self, event):
 """ toggles between zoom and pan effects for the specimen equal area on right click Parameters event : the wx.MouseEvent that triggered the call of this function Alters ------ specimen_EA_setting, toolbar2 setting """

        if event.LeftIsDown() or event.ButtonDClick():
            return
        elif self.specimen_EA_setting == "Zoom":
            self.specimen_EA_setting = "Pan"
            try:
                self.toolbar2.pan('off')
            except TypeError:
                pass
        elif self.specimen_EA_setting == "Pan":
            self.specimen_EA_setting = "Zoom"
            try:
                self.toolbar2.zoom()
            except TypeError:
                pass