def add_event(self, event, frame=None):
        """Add an event to the log."""
        if frame is None:
            frame = sys._getframe(1)

        try:
            frameno = self.frames.index(frame)
        except __HOLE__:
            frameno = len(self.frames)
            self.frames.append(frame)

        self.events.append((frameno, event, ident(frame)))
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_sys_setprofile.py/HookWatcher.add_event