code: def assert_ints_same_as_other_ranks(ints: List[int]) -> None:
      """
      NOTE: creates both communication and synchronization overhead so should be
      used sparingly
  
      takes a list of ints from each rank and ensures that they are the same
      across ranks, throwing an exception if they are not.
      """
      rank0_ints = get_lst_from_rank0(ints)
      if ints != rank0_ints:
          raise RuntimeError(
              f"disagreement between rank0 and rank{dist.get_rank()}: "
              f"rank0: {rank0_ints}, rank{dist.get_rank()}: {ints}"
          )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/utils.py
imports: import os
  from typing import List
  import torch
  from deepspeed import comm
  from deepspeed.utils import logger
  from deepspeed.ops.adam import DeepSpeedCPUAdam
  from deepspeed.ops.adam import FusedAdam
  from deepspeed.utils.nvtx import instrument_w_nvtx
label_desc: Use image node_id 4 for calling a global function with example usage: assert_ints_same_as_other_ranks(ints) without return types