def METHOD_NAME(self) -> None:
    function_defs = astroid.extract_node(
        """
    def FOO(): #@
        pass
    def lower(): #@
        pass
    def FOO(): #@
        pass
    def UPPER(): #@
        pass
    """
    )
    message = MessageTest(
        "invalid-name",
        node=function_defs[3],
        args=(
            "Function",
            "UPPER",
            "the `down` group in the '(?:(?P<ignore>FOO)|(?P<UP>[A-Z]+)|(?P<down>[a-z]+))$' pattern",
        ),
        confidence=HIGH,
        line=8,
        col_offset=0,
        end_line=8,
        end_col_offset=9,
    )
    with self.assertAddsMessages(message):
        func = None
        for func in function_defs:
            self.checker.visit_functiondef(func)
        if func:
            self.checker.leave_module(func.root)