code: def _is_srun_used() -> bool:
      return (
          "SLURM_NTASKS" in os.environ
          and not _is_slurm_interactive_mode()
      )
  
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 1 for calling a global function with example usage: _is_srun_used() and returns: unknown