code: def write(self, data, timeout = None):
          r
          return self.device.write(self, data, timeout)
docs: r"""Write data to the endpoint.
  
          The parameter data contains the data to be sent to the endpoint and
          timeout is the time limit of the operation. The transfer type and
          endpoint address are automatically inferred.
  
          The method returns the number of bytes written.
  
          For details, see the Device.write() method.