class_docstr: Cluster environment for training on a cluster managed by SLURM.
  
  You can configure the `main_address` and `main_port` properties via the env variables `MASTER_ADDR` and
  `MASTER_PORT`, respectively.
  
  Args:
      auto_requeue: Whether automatic job resubmission is enabled or not. How and under which conditions a job gets
          rescheduled gets determined by the owner of this plugin.
      requeue_signal: The signal that SLURM will send to indicate that the job should be requeued. Defaults to
          SIGUSR1 on Unix.
class_docstr_tok: ["Cluster","environment","for","training","on","a","cluster","managed","by","SLURM",".","You","can","configure","the","`","main_address","`","and","`","main_port","`","properties","via","the","env","variables","`","MASTER_ADDR","`","and","`","MASTER_PORT","`",",","respectively",".","Args",":","auto_requeue",":","Whether","automatic","job","resubmission","is","enabled","or","not",".","How","and","under","which","conditions","a","job","gets","rescheduled","gets","determined","by","the","owner","of","this","plugin",".","requeue_signal",":","The","signal","that","SLURM","will","send","to","indicate","that","the","job","should","be","requeued",".","Defaults","to","SIGUSR1","on","Unix","."]
code: def job_name() -> Optional[str]:
      return os.environ.get("SLURM_JOB_NAME")
  
imports: import logging
  import os
  import re
  import shutil
  import signal
  import sys
  from typing import Optional
  from typing_extensions import override
  from lightning.fabric.plugins.environments.cluster_environment import ClusterEnvironment
  from lightning.fabric.utilities.imports import _IS_WINDOWS
  from lightning.fabric.utilities.rank_zero import rank_zero_warn
  from lightning.fabric.utilities.warnings import PossibleUserWarning
label_desc: Use image node_id 6 for calling the SLURMEnvironment obj's underlying member method code with example usage: obj.job_name() and returns: os