code: def _append_to_init_script(init_script, lines):
      cli.out(
          f"Updating {util.format_dir(init_script)} to support Guild command completion",
          err=True,
      )
      util.ensure_dir(os.path.dirname(init_script))
      exists = os.path.exists(init_script)
      with open(init_script, "a") as f:
          if exists:
              f.write(os.linesep)
          for line in lines:
              f.write(line)
              f.write(os.linesep)
  
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 15 for calling a global function with example usage: _append_to_init_script(init_script, lines) without return types