code: def remove(self, cb):
          
          if cb in self.callbacks:
              self.callbacks.remove(cb)
              new_monitor = 0
              for c in self.callbacks:
                  new_monitor |= c.bit
              if new_monitor != self.monitor:
                  self.monitor = new_monitor
                  yield from self.pi._pigpio_aio_command(
                      _PI_CMD_NB, self.handle, self.monitor)
docs: Removes a callback.