code: def test__setup_ddp_vars_from_slurm_env_bad_configs():
      with pytest.raises(
          RuntimeError,
          match=r"Environment variable defined for PyTorch Distributed context is inconsistent",
      ):
          environ = {
              "SLURM_PROCID": "3",
              "SLURM_LOCALID": "1",
              "SLURM_NTASKS": "4",
              "SLURM_JOB_NUM_NODES": "2",
              "SLURM_JOB_NODELIST": "c1, c2",
              "SLURM_JOB_ID": "12345",
              "MASTER_ADDR": "another-addr",
              "MASTER_PORT": "12233",
              "RANK": "1",
              "LOCAL_RANK": "1",
              "WORLD_SIZE": "2",
          }
          _setup_ddp_vars_from_slurm_env(environ)
  
      with pytest.raises(
          RuntimeError,
          match=r"Environment variable defined for PyTorch Distributed context is inconsistent",
      ):
          environ = {
              "SLURM_PROCID": "1",
              "SLURM_LOCALID": "1",
              "SLURM_NTASKS": "4",
              "SLURM_JOB_NUM_NODES": "1",
              "SLURM_JOB_NODELIST": "c1",
              "SLURM_JOB_ID": "12345",
              "MASTER_ADDR": "another-addr",
              "MASTER_PORT": "12233",
              "RANK": "1",
              "LOCAL_RANK": "1",
              "WORLD_SIZE": "2",
          }
          _setup_ddp_vars_from_slurm_env(environ)
  
      with pytest.warns(
          UserWarning, match=r"We detected the following env variables"
      ):
          environ = {
              "SLURM_PROCID": "3",
              "SLURM_LOCALID": "1",
              "SLURM_NTASKS": "4",
              "SLURM_JOB_NUM_NODES": "2",
              "SLURM_JOB_NODELIST": "c1, c2",
              "SLURM_JOB_ID": "12345",
              "RANK": "1",
              "LOCAL_RANK": "1",
              "WORLD_SIZE": "2",
          }
          _setup_ddp_vars_from_slurm_env(environ)
  
      with pytest.raises(
          RuntimeError,
          match=r"No hostname detected in SLURM_JOB_NODELIST by ignite",
      ):
          environ = {
              "SLURM_PROCID": "1",
              "SLURM_LOCALID": "1",
              "SLURM_NTASKS": "4",
              "SLURM_JOB_NUM_NODES": "1",
              "SLURM_JOB_NODELIST": "[]",
              "SLURM_JOB_ID": "12345",
          }
          _setup_ddp_vars_from_slurm_env(environ)
  
imports: import os
  import pytest
  import torch
  import torch.distributed
  from ignite.distributed.comp_models import has_native_dist_support
label_desc: Use image node_id 30 for calling a global function with example usage: test__setup_ddp_vars_from_slurm_env_bad_configs() without return types