code: def _working_dir_for_run(run):
      working_dir = util.find_apply(
          [run_util.sourcecode_root, _script_source], run
      )
      if not working_dir:
          cli.error(
              "cannot find working source code directory for run {run_id}\n"
              "Try specifying the directory with 'guild diff {run_id} "
              "--working-dir DIR'.".format(run_id=run.short_id)
          )
      return working_dir
  
imports: import logging
  import os
  import re
  import subprocess
  from guild import cli
  from guild import click_util
  from guild import cmd_impl_support
  from guild import config
  from guild import run_util
  from guild import util
  from .None import remote_impl_support
  from .None import runs_impl
label_desc: Use image node_id 10 for calling a global function with example usage: _working_dir_for_run(run) and returns: working_dir