code: def collect_repositories(sources):
      return [
          {"url": s.repo, "commit": s.commit, "dirty": s.is_dirty}
          for s in sources
          if s.repo
      ]
  
imports: from typing import Generator, Tuple, Union
  import inspect
  import os.path
  from sacred.utils import PathType
  from typing import Sequence, Optional
  from collections import OrderedDict
  from sacred.config import ConfigDict, ConfigScope, create_captured_function, load_config_file
  from sacred.dependencies import PEP440_VERSION_PATTERN, PackageDependency, Source, gather_sources_and_dependencies
  from sacred.utils import CircularDependencyError, optional_kwargs_decorator, join_paths
label_desc: Use image node_id 1 for calling a global function with example usage: collect_repositories(sources) and returns: unknown