code: def _get_compute_backend(backend: str = None, df=None) -> _Backend:
      """Get the compute backend by name.
  
      In addition to searching through entrypoints, the input data (DataFrame)
      type will be used to infer an appropriate compute backend.
  
      Args:
          backend: The name of the backend, usually the package name
          df: The input dataframe which may be used to infer the backend
  
      Returns:
          _Backend
      """
      if backend:
          backend_types = [backend]
      else:
          data_type = str(type(df))
          backend_types = [
              *_DATAFRAME_BACKENDS.get(data_type, []),
              get_option("backends.compute"),
          ]
  
          # Remove duplicates, maintain order
          seen = set()
          for idx, backend_name in enumerate(backend_types):
              if backend_name in seen:
                  backend_types.pop(idx)
              else:
                  seen.add(backend_name)
  
      backend_collection = []
      for backend in backend_types:
          if _check_backend(backend, _compute_backends):
              modules = _compute_backends[backend]
          else:
              modules = _load_compute_backend(backend)
          backend_collection.append(modules)
      backend_list = [
          module for d in backend_collection for _, module in d.items()
      ]
      return _Backend(backend_list)
  
file_path: data-describe/data_describe/backends/_backends.py
imports: import importlib
  from types import ModuleType
  from typing import Dict, List, Optional
  from data_describe.config._config import get_option
  from data_describe.compat import _DATAFRAME_BACKENDS
label_desc: Use image node_id 3 for calling a global function with example usage: _get_compute_backend(backend, df) and returns: _Backend