from typing import Any, Type
from threading import Lock

class Registry:
    registry: dict[Type[Any], Type[Any]]
    registry_lock: Lock

    def __init__(self) -> None: ...
    def register_type(self, builder_type: Type[Any], struct_type: Type[Any]) -> Any: ...
    def register(self, builder_proto: Any, struct_proto: Any) -> Any: ...
    def get_builder_struct_type(self, builder_type: Type[Any]) -> Type[Any]: ...
    def new_builder_struct(self, builder_type: Type[Any]) -> Any: ...
