def METHOD_NAME(*args, **kw):
    if not args:
        raise TypeError(f'{funcname} requires at least '
                        '1 positional argument')
    impl = dispatch(args[0].__class__)
    if profiling_in_progress.is_set():
        caller = sys._getframe().f_back.f_code
        caller_id = (
            caller.co_filename,
            caller.co_firstlineno,
            caller.co_name,
        )
        impl_id = (
            impl.__code__.co_filename,
            impl.__code__.co_firstlineno,
            impl.__code__.co_name,
        )
        our_dispatches = done_dispatches.setdefault(func_id, {})
        caller_dispatches = our_dispatches.setdefault(caller_id, {})
        caller_dispatches[impl_id] = caller_dispatches.get(impl_id, 0) + 1
    return impl(*args, **kw)