code: def test_fs_observer_artifact_event(dir_obs, sample_run, tmpfile):
      basedir, obs = dir_obs
      _id = obs.started_event(**sample_run)
      run_dir = basedir.join(_id)
  
      obs.artifact_event("my_artifact.py", tmpfile.name)
  
      artifact = run_dir.join("my_artifact.py")
      assert artifact.exists()
      assert artifact.read() == tmpfile.content
  
      run = json.loads(run_dir.join("run.json").read())
      assert len(run["artifacts"]) == 1
      assert run["artifacts"][0] == artifact.relto(run_dir)
  
imports: import datetime
  import os
  from copy import copy
  import pytest
  import json
  from pathlib import Path
  from sacred.observers.file_storage import FileStorageObserver
  from sacred.metrics_logger import ScalarMetricLogEntry, linearize_metrics
label_desc: Use image node_id 15 for calling a global function with example usage: test_fs_observer_artifact_event(dir_obs, sample_run, tmpfile) without return types