def METHOD_NAME(clazz, *args):
    """Issue a warning, accounting for SCons rules.
    Check if warnings for this class are enabled.
    If warnings are treated as exceptions, raise exception.
    Use the global warning-emitter _warningOut, which allows selecting
    different ways of presenting a traceback (see Script/Main.py)
    """
    warning = clazz(args)
    for cls, flag in _enabled:
        if isinstance(warning, cls):
            if flag:
                if _warningAsException:
                    raise warning
                if _warningOut:
                    _warningOut(warning)
            break