code: def test_rank_zero_priority(environ, expected_rank):
      """Test the priority in which the rank gets determined when multiple environment variables are available."""
      with mock.patch.dict(os.environ, environ):
          assert _get_rank() == expected_rank
  
imports: import os
  import sys
  from unittest import mock
  import pytest
  from lightning.fabric.utilities.rank_zero import _get_rank
label_desc: Use image node_id 2 for calling a global function with example usage: test_rank_zero_priority(environ, expected_rank) without return types