code: def test_run_heartbeat_event(run):
      observer = run.observers[0]
      run.info["test"] = 321
      run()
      call_args, call_kwargs = observer.heartbeat_event.call_args_list[
          0
      ]
      assert call_kwargs["info"] == run.info
      assert call_kwargs["captured_out"] == ""
      assert (
          call_kwargs["beat_time"] - datetime.utcnow()
      ).total_seconds() < 1
  
imports: from datetime import datetime
  import mock
  import os
  import pytest
  import tempfile
  import sys
  from sacred.run import Run
  from sacred.config.config_summary import ConfigSummary
  from sacred.utils import ObserverError, SacredInterrupt, TimeoutInterrupt, apply_backspaces_and_linefeeds
label_desc: Use image node_id 10 for calling a global function with example usage: test_run_heartbeat_event(run) without return types