class_docstr: Represent and manage a single run of an experiment.
class_docstr_tok: ["Represent","and","manage","a","single","run","of","an","experiment","."]
code: def _emit_heartbeat(self):
      beat_time = datetime.datetime.utcnow()
      self._get_captured_output()
      # Read all measured metrics since last heartbeat
      logged_metrics = self._metrics.get_last_metrics()
      metrics_by_name = linearize_metrics(logged_metrics)
      for observer in self.observers:
          self._safe_call(
              observer,
              "log_metrics",
              metrics_by_name=metrics_by_name,
              info=self.info,
          )
          self._safe_call(
              observer,
              "heartbeat_event",
              info=self.info,
              captured_out=self.captured_out,
              beat_time=beat_time,
              result=self.result,
          )
  
imports: import datetime
  import os.path
  import sys
  import traceback
  from sacred import metrics_logger, SETTINGS
  from sacred.metrics_logger import linearize_metrics
  from sacred.randomness import set_global_seed
  from sacred.utils import SacredInterrupt, join_paths, IntervalTimer
  from sacred.stdout_capturing import get_stdcapturer
label_desc: Use image node_id 11 for calling the Run obj's underlying member method code with example usage: obj._emit_heartbeat() without return types