code: def setEventCallback(self, event, callback):
          
          if event not in EVENT_CALLBACK_SET:
              raise ValueError('Unknown event %r.' % (event, ))
          self.__event_callback_dict[event] = callback
docs: Set a function to call for a given event.
          event must be one of:
              TRANSFER_COMPLETED
              TRANSFER_ERROR
              TRANSFER_TIMED_OUT
              TRANSFER_CANCELLED
              TRANSFER_STALL
              TRANSFER_NO_DEVICE
              TRANSFER_OVERFLOW