def test_return_locals_profile_events(self):
        def collect_events(func):
            events = []
            def tracer(frame, event, args):
                events.append((frame.f_code, event))
            old_tracer = sys.getprofile()
            sys.setprofile(tracer)
            try:
                func()
            finally:
                sys.setprofile(old_tracer)
            return events
        def inner():
            return 2
        def outer():
            a = 1
            b = inner()
        events1 = set(collect_events(outer))
        events2 = set(collect_events(return_locals(outer)))
        self.assertTrue(events2.issuperset(events1))
Insure profile function gets events for function decorated with
dataset/ETHPy150Open SmartTeleMax/iktomi/tests/unstable/utils/functools.py/Tests.test_return_locals_profile_events