def METHOD_NAME():
    @register_base_type
    class Parent:
        pass
    class Child(Parent):
        __dispatch_key__ = "child"
    with pytest.raises(
        KeyError,
        match="No class found for dispatch key 'foo' in registry for type 'Parent'",
    ):
        lookup_type(Parent, "foo")