def METHOD_NAME():
    @deprecated_field(
        name="x", when=lambda x: x > 5, start_date="Jan 2022", help="test help"
    )
    class Foo(pydantic.BaseModel):
        x: Optional[int] = None
    # Does not warn
    Foo(x=0)
    Foo()
    with pytest.warns(
        PrefectDeprecationWarning,
        match=(
            "The field 'x' in 'Foo' has been deprecated. It will not be available after"
            " Jul 2022. test help"
        ),
    ):
        Foo(x=10)