def METHOD_NAME(*args, **kwargs):
    if not (warning_in and
            parse_version(warning_in) >= parse_version(__version__)):
        original_frame = inspect.stack()[-stack_frame]
        mod = inspect.getmodule(original_frame[0])
        module_name = None
        if mod:
            module_name = mod.__name__
        if module_name:
            if module_name.startswith('sopel.'):
                # core, or core plugin
                logger = logging.getLogger(module_name)
            else:
                # probably a plugin; try to handle most cases sanely
                if module_name.startswith('sopel_modules.'):
                    # namespace package plugins have a prefix, obviously
                    # they will use Sopel's namespace; other won't
                    module_name = module_name.replace(
                        'sopel_modules.',
                        'sopel.externals.',
                        1,
                    )
                logger = logging.getLogger(module_name)
        else:
            # don't know the module/plugin name, but we want to make sure
            # the log line is still output, so just get *something*
            logger = logging.getLogger(__name__)
        # Format only the desired stack frame
        trace = traceback.extract_stack()
        trace_frame = traceback.format_list(trace[:-1])[stack_frame][:-1]
        # Warn the user
        logger.warning(text + "\n" + trace_frame)
    return func(*args, **kwargs)