def METHOD_NAME(exception=Warning, *args, glob=None, regex=None, match_case=None, **kwargs):
    if glob is None and regex is None:
        return tools.METHOD_NAME(exception, *args, **kwargs)
    pattern = get_pattern(glob, regex, match_case)
    return tools.assert_warns_regex(exception, pattern, *args, **kwargs)