code: def process_events(self):
          
          while self._eventq:
              raw_event = self._eventq.popleft()  # pop next event
              if self._watch_manager.ignore_events:
                  log.debug("Event ignored: %s" % repr(raw_event))
                  continue
              watch_ = self._watch_manager.get_watch(raw_event.wd)
              if (watch_ is None) and not (raw_event.mask & IN_Q_OVERFLOW):
                  if not (raw_event.mask & IN_IGNORED):
                      # Not really sure how we ended up here, nor how we should
                      # handle these types of events and if it is appropriate to
                      # completly skip them (like we are doing here).
                      log.warning("Unable to retrieve Watch object associated to %s",
                                  repr(raw_event))
                  continue
              revent = self._sys_proc_fun(raw_event)  # system processings
              if watch_ and watch_.proc_fun:
                  watch_.proc_fun(revent)  # user processings
              else:
                  self._default_proc_fun(revent)
          self._sys_proc_fun.cleanup()  # remove olds MOVED_* events records
          if self._coalesce:
              self._eventset.clear()
docs: Routine for processing events from queue by calling their
          associated proccessing method (an instance of ProcessEvent).
          It also does internal processings, to keep the system updated.