def load_chunkmanagers(
    entrypoints: Sequence[EntryPoint],
) -> dict[str, ChunkManagerEntrypoint[Any]]:
    """Load entrypoints and instantiate chunkmanagers only once."""

    loaded_entrypoints = {}
    for entrypoint in entrypoints:
        try:
            loaded_entrypoints[entrypoint.name] = entrypoint.load()
        except ModuleNotFoundError as e:
            emit_user_level_warning(
                f"Failed to load chunk manager entrypoint {entrypoint.name} due to {e}. Skipping.",
            )

    available_chunkmanagers = {
        name: chunkmanager()
        for name, chunkmanager in loaded_entrypoints.items()
        if chunkmanager.available
    }
    return available_chunkmanagers
Load entrypoints and instantiate chunkmanagers only once.
xarray/namedarray/parallelcompat.py