"Mapper." % self.cls
                )
    def set_cls_attribute(self, attrname: str, value: _T) -> _T:
        manager = instrumentation.manager_of_class(self.cls)
        manager.install_member(attrname, value)
        return value
    def map(self, mapper_kw: _MapperKwArgs = ...) -> Mapper[Any]:
        raise NotImplementedError()
    def _early_mapping(self, mapper_kw: _MapperKwArgs) -> None:
        self.map(mapper_kw)
class _ImperativeMapperConfig(_MapperConfig):
    __slots__ = ("local_table", "inherits")
    def __init__(
        self,
        registry: _RegistryType,
        cls_: Type[_O],
        table: Optional[FromClause],
        mapper_kw: _MapperKwArgs,
    ):
        super().__init__(registry, cls_, mapper_kw)
        self.local_table = self.set_cls_attribute("__table__", table)
        with mapperlib._CONFIGURE_MUTEX:
            if not mapper_kw.get("non_primary", False):
                clsregistry.add_class(
                    self.classname, self.cls, registry._class_registry
                )
            self._setup_inheritance(mapper_kw)
            self._early_mapping(mapper_kw)
    def map(self, mapper_kw: _MapperKwArgs = util.EMPTY_DICT) -> Mapper[Any]:
        mapper_cls = Mapper
        return self.set_cls_attribute(
            "__mapper__",
            mapper_cls(self.cls, self.local_table, **mapper_kw),
        )
    def _setup_inheritance(self, mapper_kw: _MapperKwArgs) -> None:
        cls = self.cls
        inherits = mapper_kw.get("inherits", None)
        if inherits is None: