code: def _next_backup_suffix(dir):
      cur = 0
      for path in glob.glob(
          dir + SHELL_INIT_BACKUP_SUFFIX_PATTERN.format(n="*")
      ):
          try:
              n = int(os.path.splitext(path)[1][1:])
          except ValueError:
              pass
          else:
              cur = max(n, cur)
      return SHELL_INIT_BACKUP_SUFFIX_PATTERN.format(n=cur + 1)
  
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 14 for calling a global function with example usage: _next_backup_suffix(dir) and returns: SHELL_INIT_BACKUP_SUFFIX_PATTERN