code: def for_dir(run_dir, id=None):
      if not id:
          id = os.path.basename(run_dir)
      return Run(id, run_dir)
  
imports: import os
  import random
  import threading
  import time
  import uuid
  import yaml
  from guild import opref
  from guild import util
  from guild import yaml_util
label_desc: Use image node_id 5 for calling a global function with example usage: for_dir(run_dir, id) and returns: Run