code: def _test_idist_methods_overhead(ok_factor):
      import time
  
      n = 100000
      m = 5
  
      t2 = 0.0
      t1 = 0.0
      for _ in range(m):
          start = time.time()
          for _ in range(n):
              _ = dist.get_world_size()
              _ = dist.get_rank()
          elapsed = time.time() - start
          t2 += elapsed / n / m
  
          start = time.time()
          for _ in range(n):
              _ = idist.get_world_size()
              _ = idist.get_rank()
          elapsed = time.time() - start
          t1 += elapsed / n / m
  
      overhead_factor = t1 / t2
      assert (
          overhead_factor < ok_factor
      ), f"{overhead_factor} vs {ok_factor} | {t2} vs {t1}"
  
imports: import os
  import pytest
  import torch
  import torch.distributed
  from packaging.version import Version
  import ignite.distributed
  from ignite.distributed.utils import has_native_dist_support
  from tests.ignite.distributed.utils import _test_distrib__get_max_length, _test_distrib_all_gather, _test_distrib_all_gather_group, _test_distrib_all_reduce, _test_distrib_all_reduce_group, _test_distrib_barrier, _test_distrib_broadcast, _test_distrib_config, _test_distrib_new_group, _test_distrib_one_rank_only, _test_distrib_one_rank_only_with_engine, _test_sync
label_desc: Use image node_id 27 for calling a global function with example usage: _test_idist_methods_overhead(ok_factor) without return types