code: def test_default_attributes():
      """Test the default attributes when no environment variables are set."""
      env = LightningEnvironment()
      assert not env.creates_processes_externally
      assert env.main_address == "127.0.0.1"
      assert isinstance(env.main_port, int)
      assert env.world_size() == 1
      assert env.local_rank() == 0
      assert env.node_rank() == 0
  
file_path: pytorch-lightning/tests/tests_fabric/plugins/environments/test_lightning.py
imports: import os
  from unittest import mock
  import pytest
  from lightning.fabric.plugins.environments import LightningEnvironment
label_desc: Use image node_id 1 for calling a global function with example usage: test_default_attributes() without return types