code: def test_bluefog_local_rank(hier_setup):
      true_rank, true_size = mpi_env_rank_and_size()
      local_rank = bf.local_rank()
      assert true_rank % min(2, true_size) == local_rank
  
imports: import itertools
  import os
  import numpy
  import pytest
  import torch
  import networkx
  import bluefog.torch
  from common import mpi_env_rank_and_size
label_desc: Use image node_id 6 for calling a global function with example usage: test_bluefog_local_rank(hier_setup) without return types