code: def write(self, gpio, level):
          
          res = yield from self._pigpio_aio_command(_PI_CMD_WRITE, gpio, level)
          return _u2i(res)
docs: Sets the gpio level.
  
          gpio:= 0-53.
          level:= 0, 1.
  
          If PWM or servo pulses are active on the gpio they are
          switched off.
  
          ...
          pi.set_mode(17, pigpio.OUTPUT)
  
          pi.write(17,0)
          print(pi.read(17))
          0
  
          pi.write(17,1)
          print(pi.read(17))
          1
          ...