@wraps(func)
def _wrap_collect_method_callstats(*args, **kwargs):
    try:
        self = args[0]
        stack = traceback.extract_stack()
        caller = stack[(- 2)]
        stack_sig = '{relpath}:{s.name}'.format(s=caller, relpath=relpath(caller.filename, toppath))
        sig = (id(self), stack_sig)
        memo[sig][caller.lineno] += 1
        t0 = time()
        return func(*args, **kwargs)
    finally:
        times.append((time() - t0))
        pass
@wraps(func)
def _wrap_collect_method_callstats(*args, **kwargs):
    try:
        self = args[0]
        stack = traceback.extract_stack()
        caller = stack[(- 2)]
        stack_sig = '{relpath}:{s.name}'.format(s=caller, relpath=relpath(caller.filename, toppath))
        sig = (id(self), stack_sig)
        memo[sig][caller.lineno] += 1
        t0 = time()
        return func(*args, **kwargs)
    finally:
        times.append((time() - t0))
        pass