docs: def remove_global_handler(self, event, handler):
          """Removes a global handler function.
  
          Arguments:
  
              event -- Event type (a string).
              handler -- Callback function.
  
          Returns 1 on success, otherwise 0.
          """
          with self.mutex:
              if event not in self.handlers:
                  return 0
              for h in self.handlers[event]:
                  if handler == h.callback:
                      self.handlers[event].remove(h)
          return 1