code: def is_model_in_modules(model_name, module_names):
      """Check if a model exists within a subset of modules
      Args:
          model_name (str) - name of model to check
          module_names (tuple, list, set) - names of modules to search in
      """
      assert isinstance(module_names, (tuple, list, set))
      return any(
          model_name in _module_to_models[n] for n in module_names
      )
  
file_path: generalized-moe/domainbed/registry.py
imports: import sys
  import re
  import fnmatch
  from collections import defaultdict
  from copy import deepcopy
label_desc: Use image node_id 7 for calling a global function with example usage: is_model_in_modules(model_name, module_names) and returns: any