code: def marked_or_latest_run_for_stage(
      stage, run_id_prefix=None, status=None
  ):
      status = status or ("completed",)
      runs = runs_for_stage(stage, run_id_prefix, status)
      if not runs:
          return None
      for run in runs:
          if run.get("marked"):
              return run
      return runs[0]
  
imports: import json
  import logging
  import os
  import subprocess
  import yaml
  from guild import util
  from guild import var
label_desc: Use image node_id 13 for calling a global function with example usage: marked_or_latest_run_for_stage(stage, run_id_prefix, status) and returns: runs, None, run