code: def _gen_install_completion_script_to_init(
      init_script, sentinel, lines, backup=True
  ):
      init_script = os.path.expanduser(init_script)
      _check_init_script(init_script, sentinel)
      if backup:
          _backup_init_script(init_script)
      _append_to_init_script(init_script, lines)
      cli.out(
          "Guild command completion is installed - changes will take effect the next "
          "time you open a terminal session"
      )
  
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 10 for calling a global function with example usage: _gen_install_completion_script_to_init(init_script, sentinel, lines, backup) without return types