def get_backend(backend: str) -> OCIBuilder:
    """
    Get a given backend.

    Raises:
        ``ValueError``: If given backend is not available in backend registry.
    """
    if isinstance(backend, OCIBuilder):
        if backend not in BUILDER_REGISTRY.values():
            logger.warning(
                "Backend '%s' not registered. To use with 'bentoml.container.build', make sure to regsiter it with 'bentoml.container.register_backend'",
                backend,
            )
        return backend
    if backend not in BUILDER_REGISTRY:
        raise ValueError(
            f"Backend {backend} not registered. Available backends: {REGISTERED_BACKENDS}."
        )
    return BUILDER_REGISTRY[backend]
Get a given backend.

Raises:
``ValueError``: If given backend is not available in backend registry.
src/bentoml/_internal/container/__init__.py