code: def add_callback(self, events, callback):
          
          if self._poll is None:
              raise RuntimeError('poll instance is closed')
          if events & ~(READABLE|WRITABLE):
              raise ValueError('illegal event mask: {}'.format(events))
          if events & READABLE:
              self._readers += 1
          if events & WRITABLE:
              self._writers += 1
          handle = add_callback(self, callback, events)
          self._sync()
          return handle
docs: Add a new callback.