code: def test_fs_observer_heartbeat_event_updates_run(dir_obs, sample_run):
      basedir, obs = dir_obs
      _id = obs.started_event(**sample_run)
      run_dir = basedir.join(_id)
      info = {"my_info": [1, 2, 3], "nr": 7}
      obs.heartbeat_event(
          info=info, captured_out="some output", beat_time=T2, result=17
      )
  
      assert run_dir.join("cout.txt").read() == "some output"
      run = json.loads(run_dir.join("run.json").read())
  
      assert run["heartbeat"] == T2.isoformat()
      assert run["result"] == 17
  
      assert run_dir.join("info.json").exists()
      i = json.loads(run_dir.join("info.json").read())
      assert info == i
  
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 10 for calling a global function with example usage: test_fs_observer_heartbeat_event_updates_run(dir_obs, sample_run) without return types