def METHOD_NAME():
    @resource(config_schema={"foo": Field(str, is_required=False, default_value="bar")})
    def resource_requires_config(context):
        assert context.resource_config["foo"] == "bar"
        return context.resource_config["foo"]
    assert resource_requires_config(None) == "bar"
    @resource(config_schema=Field(str, is_required=False, default_value="bar"))
    def resource_requires_config_val(context):
        assert context.resource_config == "bar"
        return context.resource_config
    assert resource_requires_config_val(None) == "bar"
    @resource(
        config_schema={
            "foo": Field(str, is_required=False, default_value="bar"),
            "baz": str,
        }
    )
    def resource_requires_config_partial(context):
        assert context.resource_config["foo"] == "bar"
        assert context.resource_config["baz"] == "bar"
        return context.resource_config["foo"] + context.resource_config["baz"]
    assert (
        resource_requires_config_partial(build_init_resource_context(config={"baz": "bar"}))
        == "barbar"
    )