def METHOD_NAME():
    class Foo:
        pass
    with pytest.raises(
        ValueError,
        match=(
            "Type 'Foo' does not define a value for '__dispatch_key__' which is"
            " required for registry lookup."
        ),
    ):
        get_dispatch_key(Foo())