code: def test_node_rank_from_group_rank():
      """Test that the GROUP_RANK substitutes NODE_RANK."""
      env = LightningEnvironment()
      assert "NODE_RANK" not in os.environ
      assert env.node_rank() == 1
  
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 4 for calling a global function with example usage: test_node_rank_from_group_rank() without return types