code: def test_tensorflow_model_dependencies(opt_dep):
      """Tests that the tensorflow models module correctly protects against uninstalled optional dependencies."""
      dependency_map = defaultdict(lambda: ["default"])
      for dependency, relations in [
          ("AE", ["tensorflow"]),
          ("AEGMM", ["tensorflow"]),
          ("Seq2Seq", ["tensorflow"]),
          ("VAE", ["tensorflow"]),
          ("VAEGMM", ["tensorflow"]),
          ("resnet", ["tensorflow"]),
          ("PixelCNN", ["tensorflow"]),
          ("TransformerEmbedding", ["tensorflow"]),
          ("trainer", ["tensorflow"]),
          ("eucl_cosim_features", ["tensorflow"]),
          ("elbo", ["tensorflow"]),
          ("loss_vaegmm", ["tensorflow"]),
          ("loss_aegmm", ["tensorflow"]),
          ("loss_adv_ae", ["tensorflow"]),
          ("loss_distillation", ["tensorflow"]),
          ("scale_by_instance", ["tensorflow"]),
      ]:
          dependency_map[dependency] = relations
      from alibi_detect.models import tensorflow as tf_models
  
      check_correct_dependencies(tf_models, 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 8 for calling a global function with example usage: test_tensorflow_model_dependencies(opt_dep) without return types