def _tracker_check(self, frame, event):
        """ Check if any function tracker is currently active.

        """
        code = frame.f_code
        if code in self.functions:
            tracker = self._code_trackers.setdefault(code, KeepTrack())
            if event == 'call':
                tracker('ping')
            else:
                tracker('pong')
            if not tracker:
                del self._code_trackers[code]
            return True
        return any(self._code_trackers.itervalues())

    # Override the default attach method to support arguments.
dataset/ETHPy150Open enthought/pikos/pikos/monitors/focused_function_mixin.py/FocusedFunctionMixin._tracker_check/original