<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def discard_events(self, event_type, mechanism):
 """Discards event occurrences for specified event types and mechanisms in this resource. :param event_type: Logical event identifier. :param mechanism: Specifies event handling mechanisms to be dicarded. (Constants.VI_QUEUE, .VI_HNDLR, .VI_SUSPEND_HNDLR, .VI_ALL_MECH) """

        self.visalib.discard_events(self.session, event_type, mechanism)