code: def _slurm_sigusr_handler_fn(
      self, signum: _SIGNUM, _: FrameType
  ) -> None:
      rank_zero_info(f"Handling auto-requeue signal: {signum}")
  
      # save logger to make sure we get all the metrics
      for logger in self.trainer.loggers:
          logger.finalize("finished")
  
      hpc_save_path = self.trainer._checkpoint_connector.hpc_save_path(
          self.trainer.default_root_dir
      )
      self.trainer.save_checkpoint(hpc_save_path)
  
      if self.trainer.is_global_zero:
          # find job id
          array_job_id = os.getenv("SLURM_ARRAY_JOB_ID")
          if array_job_id is not None:
              array_task_id = os.environ["SLURM_ARRAY_TASK_ID"]
              job_id = f"{array_job_id}_{array_task_id}"
          else:
              job_id = os.environ["SLURM_JOB_ID"]
  
          assert re.match("[0-9_-]+", job_id)
          cmd = ["scontrol", "requeue", job_id]
  
          # requeue job
          log.info(f"requeing job {job_id}...")
          try:
              result = call(cmd)
          except FileNotFoundError:
              # This can occur if a subprocess call to `scontrol` is run outside a shell context
              # Re-attempt call (now with shell context). If any error is raised, propagate to user.
              # When running a shell command, it should be passed as a single string.
              result = call(" ".join(cmd), shell=True)
  
          # print result text
          if result == 0:
              log.info(f"Requeued SLURM job: {job_id}")
          else:
              log.warning(
                  f"Requeuing SLURM job {job_id} failed with error code {result}"
              )
  
imports: import logging
  import os
  import re
  import signal
  import sys
  import threading
  from subprocess import call
  from types import FrameType
  from typing import Any, Callable, Dict, List, Set, Union
  import lightning.pytorch
  from lightning.fabric.plugins.environments import SLURMEnvironment
  from lightning.fabric.utilities.imports import _IS_WINDOWS, _PYTHON_GREATER_EQUAL_3_8_0
  from lightning.pytorch.utilities.rank_zero import rank_prefixed_message, rank_zero_info
label_desc: Use image node_id 3 for calling the _SignalConnector obj's underlying member method code with example usage: obj._slurm_sigusr_handler_fn(signum, _) without return types