docstr: Raises import error if backend choice has missing dependency.
docstr_tok: ["Raises","import","error","if","backend","choice","has","missing","dependency","."]
code: def _raise_import_error(self, missing_deps: List[str], backend: str):
      """Raises import error if backend choice has missing dependency."""
  
      optional_dependencies = list(
          ERROR_TYPES[missing_dep] for missing_dep in missing_deps
      )
      optional_dependencies.sort()
      missing_deps_str = _iter_to_str(missing_deps)
      error_msg = (
          f"{missing_deps_str} not installed. Cannot initialize and run {self.construct_name} "
          f"with {backend} backend."
      )
      pip_msg = (
          ""
          if not optional_dependencies
          else (
              f"The necessary missing dependencies can be installed using "
              f'`pip install alibi-detect[{" ".join(optional_dependencies)}]`.'
          )
      )
      raise ImportError(f"{error_msg} {pip_msg}")
  
file_path: alibi-detect/alibi_detect/utils/frameworks.py
imports: from .missing_optional_dependency import ERROR_TYPES
  from typing import Optional, List, Dict, Iterable
  from enum import Enum
label_desc: Use image node_id 3 for calling the BackendValidator obj's underlying member method code with example usage: obj._raise_import_error(missing_deps, backend) without return types