code: def is_in_slurm_job() -> bool:
      return (
          "SLURM_PROCID" in os.environ and "SLURM_NTASKS" in os.environ
      )
  
imports: import dataclasses
  import os
  import socket
  from typing import Optional
  import torch
  import torch.distributed
label_desc: Use image node_id 2 for calling a global function with example usage: is_in_slurm_job() and returns: unknown