code: def test_default_attributes():
      """Test the default attributes when no environment variables are set."""
      env = SLURMEnvironment()
      assert env.creates_processes_externally
      assert env.main_address == "127.0.0.1"
      assert env.main_port == 12910
      assert env.job_name() is None
      assert env.job_id() is None
  
      with pytest.raises(KeyError):
          # world size is required to be passed as env variable
          env.world_size()
      with pytest.raises(KeyError):
          # local rank is required to be passed as env variable
          env.local_rank()
      with pytest.raises(KeyError):
          # node_rank is required to be passed as env variable
          env.node_rank()
  
file_path: pytorch-lightning/tests/tests_fabric/plugins/environments/test_slurm.py
imports: import logging
  import os
  import shutil
  import sys
  from unittest import mock
  import pytest
  from lightning.fabric.plugins.environments import SLURMEnvironment
  from lightning.fabric.utilities.warnings import PossibleUserWarning
  from lightning_utilities.test.warning import no_warning_call
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 1 for calling a global function with example usage: test_default_attributes() without return types