code: def get_sources_from_modules(
      module_iterator, base_path, save_git_info
  ):
      sources = set()
      for modname, mod in module_iterator:
          # hasattr doesn't work with python extensions
          if not getattr(mod, "__file__", None):
              continue
  
          filename = os.path.abspath(mod.__file__)
          if filename not in sources and is_local_source(
              filename, modname, base_path
          ):
              s = Source.create(filename, save_git_info)
              sources.add(s)
      return sources
  
imports: import functools
  import hashlib
  import os.path
  import re
  import sys
  from pathlib import Path
  import pkg_resources
  import sacred.optional
  from sacred import SETTINGS
  from sacred.utils import iter_prefixes
label_desc: Use image node_id 10 for calling a global function with example usage: get_sources_from_modules(module_iterator, base_path, save_git_info) and returns: sources