code: def _completion_script(shell):
      path = os.path.join(_completions_dir(), f"{shell}-guild")
      if log.getEffectiveLevel() <= logging.DEBUG:
          log.debug("completion script path for %s: %s", shell, path)
      if not os.path.exists(path):
          cli.error(f"unsupported shell: {shell}")
      return open(path, "r").read()
  
imports: import glob
  import logging
  import os
  import shutil
  import sys
  import guild
  from guild import cli
  from guild import config
  from guild import util
label_desc: Use image node_id 2 for calling a global function with example usage: _completion_script(shell) and returns: open