def METHOD_NAME(self, instance: T, protocol: Protocol) -> None:
    """Register a new instance for an interface."""
    if protocol not in self._priorities:
        raise RuntimeError(f"{protocol} not in priority list")
    self._interfaces[protocol] = instance