code: def test_sql_observer_failed_event_updates_run(
      sql_obs, sample_run, session
  ):
      sql_obs.started_event(**sample_run)
      fail_trace = ["lots of errors and", "so", "on..."]
      sql_obs.failed_event(fail_time=T2, fail_trace=fail_trace)
  
      assert session.query(Run).count() == 1
      db_run = session.query(Run).first()
  
      assert db_run.stop_time == T2
      assert db_run.status == "FAILED"
      assert db_run.fail_trace == "lots of errors and\nso\non..."
  
imports: import datetime
  import pytest
  from sacred.serializer import json
  from sacred.observers.sql import SqlObserver
  from sacred.observers.sql_bases import Host, Experiment, Run, Source, Resource
label_desc: Use image node_id 11 for calling a global function with example usage: test_sql_observer_failed_event_updates_run(sql_obs, sample_run, session) without return types