code: def _run_core_attrs(run):
      opref = run.opref
      started = run.get("started")
      stopped = run.get("stopped")
      status = run.status
      data = {
          "id": run.id,
          "run": run.short_id,
          "operation": run_util.format_operation(run),
          "from": run_util.format_pkg_name(run),
          "op": opref.op_name,
          "op_model": opref.model_name,
          "short_id": run.short_id,
          "sourcecode": util.short_digest(run.get("sourcecode_digest")),
          "started": util.format_timestamp(started),
          "stopped": util.format_timestamp(stopped),
          "status": status,
          "time": run_util.calc_run_duration(status, started, stopped),
      }
      assert sorted(data) == sorted(CORE_ATTRS), data
      return data
  
imports: import logging
  import os
  import sqlite3
  from guild import run_util
  from guild import tfevent
  from guild import util
  from guild import var
label_desc: Use image node_id 7 for calling a global function with example usage: _run_core_attrs(run) and returns: data