def METHOD_NAME():
    error_regex = r".* inside the body.*parameter 'resource'.*"
    with pytest.raises(TypeError, match=error_regex):
        @func
        def my_func(resource: AbstractExternalResource) -> int:
            return 42