code: def test_fs_observer_failed_event_updates_run(dir_obs, sample_run):
      basedir, obs = dir_obs
      _id = obs.started_event(**sample_run)
      run_dir = basedir.join(_id)
  
      fail_trace = "lots of errors and\nso\non..."
      obs.failed_event(fail_time=T2, fail_trace=fail_trace)
  
      run = json.loads(run_dir.join("run.json").read())
      assert run["stop_time"] == T2.isoformat()
      assert run["status"] == "FAILED"
      assert run["fail_trace"] == fail_trace
  
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 14 for calling a global function with example usage: test_fs_observer_failed_event_updates_run(dir_obs, sample_run) without return types