code: def create(filename, save_git_info=True):
      if not filename or not os.path.exists(filename):
          raise ValueError(
              'invalid filename or file not found "{}"'.format(filename)
          )
  
      main_file = get_py_file_if_possible(os.path.abspath(filename))
      repo, commit, is_dirty = get_commit_if_possible(
          main_file, save_git_info
      )
      return Source(
          main_file, get_digest(main_file), repo, commit, is_dirty
      )
  
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 2 for calling the Source obj's underlying member method code with example usage: obj.create(filename, save_git_info) and returns: Source