code: def setInterrupt(
              self, endpoint, buffer_or_len, callback=None, user_data=None,
              timeout=0):
          
          if self.__submitted:
              raise ValueError('Cannot alter a submitted transfer')
          if self.__doomed:
              raise DoomedTransferError('Cannot reuse a doomed transfer')
          string_buffer, self.__transfer_py_buffer = create_binary_buffer(
              buffer_or_len
          )
          self.__initialized = False
          self.__transfer_buffer = string_buffer
          self.__user_data = user_data
          libusb1.libusb_fill_interrupt_transfer(
              self.__transfer, self.__handle, endpoint, string_buffer,
              sizeof(string_buffer), self.__ctypesCallbackWrapper, None, timeout)
          self.__callback = callback
          self.__initialized = True
docs: Setup transfer for interrupt use.
  
          endpoint
              Endpoint to submit transfer to. Defines transfer direction (see
              ENDPOINT_OUT and ENDPOINT_IN)).
          buffer_or_len
              Either a string (when sending data), or expected data length (when
              receiving data)
              To avoid memory copies, use an object implementing the writeable
              buffer interface (ex: bytearray).
          callback
              Callback function to be invoked on transfer completion.
              Called with transfer as parameter, return value ignored.
          user_data
              User data to pass to callback function.
          timeout
              Transfer timeout in milliseconds. 0 to disable.