code: def requeue_support():
      return """
          trap_handler () {
             echo "Caught signal: " $1
             # SIGTERM must be bypassed
             if [ "$1" = "TERM" ]; then
                 echo "bypass sigterm"
             else
               # Submit a new job to the queue
               echo "Requeuing " $SLURM_JOB_ID
               scontrol requeue $SLURM_JOB_ID
             fi
          }
  
  
          # Install signal handler
          trap 'trap_handler USR1' USR1
          trap 'trap_handler TERM' TERM
      """
  
file_path: mmf/tools/sweeps/lib/slurm.py
imports: import datetime
  import itertools
  import os
  import random
  import shlex
  import shutil
  import subprocess
  from collections import OrderedDict
  from glob import glob
  from mmf.utils.general import get_mmf_root
label_desc: Use image node_id 8 for calling a global function with example usage: requeue_support() and returns: str