code: def find_or_save(self, filename, store_dir: Path):
      try:
          Path(filename).resolve().relative_to(
              Path(self.basedir).resolve()
          )
          is_relative_to = True
      except ValueError:
          is_relative_to = False
  
      if is_relative_to and not self.copy_artifacts:
          return filename
      else:
          store_dir.mkdir(parents=True, exist_ok=True)
          source_name, ext = os.path.splitext(
              os.path.basename(filename)
          )
          md5sum = get_digest(filename)
          store_name = source_name + "_" + md5sum + ext
          store_path = store_dir / store_name
          if not store_path.exists():
              copyfile(filename, str(store_path))
          return store_path
  
imports: import json
  import os
  import os.path
  from pathlib import Path
  from typing import Optional
  import warnings
  from shutil import copyfile, SameFileError
  from sacred.commandline_options import cli_option
  from sacred.dependencies import get_digest
  from sacred.observers.base import RunObserver
  from sacred import optional
  from sacred.serializer import flatten
  from sacred.utils import PathType
label_desc: Use image node_id 11 for calling the FileStorageObserver obj's underlying member method code with example usage: obj.find_or_save(filename, store_dir) and returns: filename, store_path