def _get_global_gloo_group():
    """
    Return a process group based on gloo backend, containing all the ranks
    The result is cached.
    """
    if dist.get_backend() == "nccl":
        return dist.new_group(backend="gloo")
    else:
        return dist.group.WORLD

    Return a process group based on gloo backend, containing all the ranks
    The result is cached.
    
video_chat_with_MOSS/models/grit_src/third_party/CenterNet2/detectron2/utils/comm.py