def METHOD_NAME(self) -> None:
    """Test custom warning message when deprecating arguments."""
    @_deprecate_arguments(
        version="xxx",
        deprecated_args={"a"},
        custom_message="This is a custom message.",
    )
    def dummy_deprecated_custom_message(a: str = "a") -> None:
        pass
    # Custom message
    with pytest.warns(FutureWarning) as record:
        dummy_deprecated_custom_message(a="A")
    self.assertEqual(len(record), 1)
    self.assertEqual(
        record[0].message.args[0],
        "Deprecated argument(s) used in 'dummy_deprecated_custom_message': a."
        " Will not be supported from version 'xxx'.\n\nThis is a custom"
        " message.",
    )