code: def test_dataset_dependencies(opt_dep):
      """Tests that the datasets module correctly protects against uninstalled optional dependencies."""
      datasets_dependency_map = defaultdict(lambda: ["default"])
      for dependency, relations in [
          ("fetch_fashion_mnist", ["tensorflow"])
      ]:
          datasets_dependency_map[dependency] = relations
      from alibi import datasets
  
      check_correct_dependencies(
          datasets, datasets_dependency_map, opt_dep
      )
  
file_path: alibi/alibi/tests/test_dep_management.py
imports: from types import ModuleType
  from collections import defaultdict
label_desc: Use image node_id 4 for calling a global function with example usage: test_dataset_dependencies(opt_dep) without return types