code: def _op_finalize_run_attrs(run, exit_status):
      if not os.path.exists(run.dir):
          log.warning(
              "run directory has been deleted, unable to finalize"
          )
          return
      if not os.path.exists(run.guild_path()):
          log.warning(
              "run Guild directory has been deleted, unable to finalize"
          )
          return
      stopped = runlib.timestamp()
      run.write_attr("exit_status", exit_status)
      run.write_attr("stopped", stopped)
      op_util.delete_proc_lock(run)
  
imports: import logging
  import os
  import subprocess
  import time
  from guild import config
  from guild import exit_code
  from guild import log
  from guild import op_dep
  from guild import op_util
  from guild import run
  from guild import util
label_desc: Use image node_id 26 for calling a global function with example usage: _op_finalize_run_attrs(run, exit_status) without return types