code: def test_saving_tf_dependencies(opt_dep):
      """Tests that the alibi_detect.saving._tensorflow module correctly protects against uninstalled optional
      dependencies.
      """
      dependency_map = defaultdict(lambda: ["default"])
      for dependency, relations in [
          ("Detector", ["tensorflow"]),
          ("load_detector_legacy", ["tensorflow"]),
          ("load_embedding_tf", ["tensorflow"]),
          ("load_kernel_config_tf", ["tensorflow"]),
          ("load_model_tf", ["tensorflow"]),
          ("load_optimizer_tf", ["tensorflow"]),
          ("prep_model_and_emb_tf", ["tensorflow"]),
          ("save_detector_legacy", ["tensorflow"]),
          ("save_model_config_tf", ["tensorflow"]),
          ("save_optimizer_config_tf", ["tensorflow"]),
          ("get_tf_dtype", ["tensorflow"]),
      ]:
          dependency_map[dependency] = relations
      from alibi_detect.saving import _tensorflow as tf_saving
  
      check_correct_dependencies(tf_saving, dependency_map, opt_dep)
  
file_path: alibi-detect/alibi_detect/tests/test_dep_management.py
imports: from types import ModuleType
  from collections import defaultdict
label_desc: Use image node_id 12 for calling a global function with example usage: test_saving_tf_dependencies(opt_dep) without return types