code: def test_sql_observer_heartbeat_event_updates_run(
      sql_obs, sample_run, session
  ):
      sql_obs.started_event(**sample_run)
  
      info = {"my_info": [1, 2, 3], "nr": 7}
      outp = "some output"
      sql_obs.heartbeat_event(
          info=info, captured_out=outp, beat_time=T2, result=23.5
      )
  
      assert session.query(Run).count() == 1
      db_run = session.query(Run).first()
      assert db_run.heartbeat == T2
      assert db_run.result == 23.5
      assert json.decode(db_run.info) == info
      assert db_run.captured_out == outp
  
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 8 for calling a global function with example usage: test_sql_observer_heartbeat_event_updates_run(sql_obs, sample_run, session) without return types