code: def _install_signal_handlers(self):
          
  
          def stop(signum, frame):
              """
              Register scheduler's death and exit
              and remove previously acquired lock and exit.
              """
              self.log.info('Shutting down RQ scheduler...')
              self.register_death()
              self.remove_lock()
              raise SystemExit()
  
          signal.signal(signal.SIGINT, stop)
          signal.signal(signal.SIGTERM, stop)
docs: Installs signal handlers for handling SIGINT and SIGTERM
          gracefully.