def add_handler(self, handler):
if not isinstance(handler, EventHandler):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>with self.lock:<EOL><INDENT>if handler in self.handlers:<EOL><INDENT>return<EOL><DEDENT>self.handlers.append(handler)<EOL>self._update_handlers()<EOL><DEDENT>
Add a handler object.

        :Parameters:
            - `handler`: the object providing event handler methods
        :Types:
            - `handler`: `EventHandler`