code: def interruptRead(self, endpoint, length, timeout=0):
          
          # pylint: disable=undefined-variable
          endpoint = (endpoint & ~ENDPOINT_DIR_MASK) | ENDPOINT_IN
          # pylint: enable=undefined-variable
          data, data_buffer = create_binary_buffer(length)
          try:
              transferred = self._interruptTransfer(
                  endpoint,
                  data,
                  length,
                  timeout,
              )
          except USBErrorTimeout as exception:
              exception.received = data_buffer[:exception.transferred]
              raise
          return data_buffer[:transferred]
docs: Synchronous interrupt write.
          timeout: in milliseconds, how long to wait for data. Set to 0 to
            disable.
          See interruptWrite for other parameters description.
  
          To avoid memory copies, use an object implementing the writeable buffer
          interface (ex: bytearray) for the "data" parameter.
  
          Returns received data.
  
          May raise an exception from the USBError family. USBErrorTimeout
          exception has a "received" property giving the bytes received up to the
          timeout.