class_docstr: Describe the environment inside which the job is running.
  This includes job id, number of GPUs available, ...
  
  This class can only be instantiated from a running submitit job.
  
  @plugin-dev: default implementation look for information into environment variables.
  Override _env to map environment variable to each property.
docstr: Set up signals handler for the current executable.
  
  The default implementation checkpoint the given submission and requeues it.
  @plugin-dev: Should be adapted to the signals used in this cluster.
code: def _handle_signals(
      self, paths: JobPaths, submission: DelayedSubmission
  ) -> None:
      """Set up signals handler for the current executable.
  
      The default implementation checkpoint the given submission and requeues it.
      @plugin-dev: Should be adapted to the signals used in this cluster.
      """
      handler = SignalHandler(self, paths, submission)
      signal.signal(self._usr_sig(), handler.checkpoint_and_try_requeue)
      # A priori we don't need other signals anymore,
      # but still log them to make it easier to debug.
      signal.signal(signal.SIGTERM, handler.bypass)
      signal.signal(signal.SIGCONT, handler.bypass)
  
imports: import os
  import signal
  import socket
  import sys
  import time
  import types
  import typing
  from pathlib import Path
  from .None import logger, utils
  from .utils import DelayedSubmission, JobPaths
label_desc: Use image node_id 19 for calling the JobEnvironment obj's underlying member method code with example usage: obj._handle_signals(paths, submission) without return types