code: def test_topology_rank_repr():
      topo = Topo(axes=["a", "b"], dims=[2, 2])
      assert topo.get_rank_repr(rank=0) == "a_00-b_00"
      assert topo.get_rank_repr(rank=1) == "a_00-b_01"
      assert topo.get_rank_repr(rank=2) == "a_01-b_00"
      assert topo.get_rank_repr(rank=3) == "a_01-b_01"
  
      assert topo.get_rank_repr(rank=3, inner_sep="+") == "a+01-b+01"
      assert (
          topo.get_rank_repr(rank=3, inner_sep="🤗", outer_sep="_JEFF_")
          == "a🤗01_JEFF_b🤗01"
      )
  
      topo = Topo(axes=["pipe", "data"], dims=[2, 2])
      assert topo.get_rank_repr(rank=0) == ""
      assert topo.get_rank_repr(rank=1) == ""
      assert topo.get_rank_repr(rank=2) == ""
      assert topo.get_rank_repr(rank=3) == ""
  
      assert topo.get_rank_repr(rank=0, omit_axes=["pipe"]) == "data_00"
      assert topo.get_rank_repr(rank=1, omit_axes=["pipe"]) == "data_01"
      assert topo.get_rank_repr(rank=2, omit_axes=["pipe"]) == "data_00"
      assert topo.get_rank_repr(rank=3, omit_axes=["pipe"]) == "data_01"
  
      assert (
          topo.get_rank_repr(rank=0, omit_axes=[]) == "pipe_00-data_00"
      )
      assert (
          topo.get_rank_repr(rank=1, omit_axes=[]) == "pipe_00-data_01"
      )
      assert (
          topo.get_rank_repr(rank=2, omit_axes=[]) == "pipe_01-data_00"
      )
      assert (
          topo.get_rank_repr(rank=3, omit_axes=[]) == "pipe_01-data_01"
      )
  
      topo = Topo(axes=["pipe", "data", "model"], dims=[2, 2, 2])
      assert topo.get_rank_repr(rank=0) == "model_00"
      assert topo.get_rank_repr(rank=1) == "model_01"
      assert topo.get_rank_repr(rank=2) == "model_00"
      assert topo.get_rank_repr(rank=3) == "model_01"
      assert topo.get_rank_repr(rank=4) == "model_00"
      assert topo.get_rank_repr(rank=5) == "model_01"
      assert topo.get_rank_repr(rank=6) == "model_00"
      assert topo.get_rank_repr(rank=7) == "model_01"
  
file_path: DeepSpeed/tests/unit/runtime/pipe/test_topology.py
imports: import pytest
  import torch
  import deepspeed.comm
  from deepspeed.runtime.pipe.topology import PipelineParallelGrid
  from deepspeed.runtime.pipe.topology import ProcessTopology
  from deepspeed.runtime.pipe.topology import _prime_factors
  from deepspeed.accelerator import get_accelerator
  from unit.common import DistributedTest
label_desc: Use image node_id 4 for calling a global function with example usage: test_topology_rank_repr() without return types