code: def save_sources(self, ex_info):
      base_dir = ex_info["base_dir"]
      source_info = []
      for source_name, md5 in ex_info["sources"]:
          abs_path = os.path.join(base_dir, source_name)
          file = self.fs.find_one({"filename": abs_path, "md5": md5})
          if file:
              _id = file._id
          else:
              with open(abs_path, "rb") as f:
                  _id = self.fs.put(f, filename=abs_path)
          source_info.append([source_name, _id])
      return source_info
  
imports: from typing import Optional, Union
  import mimetypes
  import os.path
  import pickle
  import re
  import sys
  import time
  from tempfile import NamedTemporaryFile
  import warnings
  import sacred.optional
  from sacred.commandline_options import cli_option
  from sacred.dependencies import get_digest
  from sacred.observers.base import RunObserver
  from sacred.observers.queue import QueueObserver
  from sacred.serializer import flatten
  from sacred.utils import ObserverError, PathType
  import pkg_resources
label_desc: Use image node_id 18 for calling the MongoObserver obj's underlying member method code with example usage: obj.save_sources(ex_info) and returns: source_info