class_docstr: Simple backend dispatch for collection-creation functions
class_docstr_tok: ["Simple","backend","dispatch","for","collection-creation","functions"]
docstr: Return the desired backend entrypoint
docstr_tok: ["Return","the","desired","backend","entrypoint"]
code: def dispatch(self, backend: str):
      """Return the desired backend entrypoint"""
      try:
          impl = self._lookup[backend]
      except KeyError:
          # Check entrypoints for the specified backend
          entrypoints = detect_entrypoints(
              f"dask.{self._module_name}.backends"
          )
          if backend in entrypoints:
              return self.register_backend(
                  backend, entrypoints[backend].load()()
              )
      else:
          return impl
      raise ValueError(f"No backend dispatch registered for {backend}")
  
file_path: dask/dask/backends.py
imports: from __future__ import annotations
  from collections.abc import Callable
  from functools import lru_cache, wraps
  from typing import TYPE_CHECKING, Generic, TypeVar
  import importlib_metadata
  from dask import config
  from dask.utils import funcname
label_desc: Use image node_id 3 for calling the CreationDispatch obj's underlying member method code with example usage: obj.dispatch(backend) and returns: impl, self