def METHOD_NAME():
    @register_base_type
    class Parent:
        pass
    class Child(Parent):
        __dispatch_key__ = "a"
    with pytest.warns(
        UserWarning,
        match=(
            "Type 'OtherChild' at .* has key 'a' that matches existing registered type "
            "'Child' from .*. The existing type will be overridden."
        ),
    ):
        class OtherChild(Parent):
            __dispatch_key__ = "a"
    assert lookup_type(Parent, "a") == OtherChild