code: def test_tensorflow_model_dependencies(opt_dep):
      """Tests that the tensorflow model module correctly protects against uninstalled optional dependencies."""
      tf_model_dependency_map = defaultdict(lambda: ["default"])
      for dependency, relations in [
          ("ADULTEncoder", ["tensorflow"]),
          ("ADULTDecoder", ["tensorflow"]),
          ("MNISTEncoder", ["tensorflow"]),
          ("MNISTDecoder", ["tensorflow"]),
          ("MNISTClassifier", ["tensorflow"]),
          ("HeAE", ["tensorflow"]),
          ("AE", ["tensorflow"]),
          ("Actor", ["tensorflow"]),
          ("Critic", ["tensorflow"]),
      ]:
          tf_model_dependency_map[dependency] = relations
      from alibi.models import tensorflow
  
      check_correct_dependencies(
          tensorflow, tf_model_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 6 for calling a global function with example usage: test_tensorflow_model_dependencies(opt_dep) without return types