def build_model_bases(
    mt: type[ModelType], at: type[ApiType], *, api_member_name: Optional[str] = None
) -> tuple[type[Entity[ModelType, ApiType]], type[Repo[ModelType, ApiType]]]:
    """
    Helps to remove code duplication in declarations of derived classes
    """

    class _EntityBase(Entity[ModelType, ApiType]):
        if api_member_name:
            _api_member_name = api_member_name

    class _RepoBase(Repo[ModelType, ApiType]):
        if api_member_name:
            _api_member_name = api_member_name

    return _EntityBase, _RepoBase

    Helps to remove code duplication in declarations of derived classes
    
cvat-sdk/cvat_sdk/core/proxies/model_proxy.py