code: def all_rank_call_context():
      """
      在多卡模式下，该环境内，会暂时地将 ``FASTNLP_GLOBAL_RAN``K 设置为 **"0"** ，使得 :func:`rank_zero_call` 函数失效，使得每个进程都会运行该函数。
  
      使用方式::
  
          with all_rank_call_context():
              do_something  # all rank will do
  
      """
      old_fastnlp_global_rank = (
          os.environ[FASTNLP_GLOBAL_RANK]
          if FASTNLP_GLOBAL_RANK in os.environ
          else None
      )
      os.environ[FASTNLP_GLOBAL_RANK] = "0"
  
      yield
  
      if old_fastnlp_global_rank is not None:
          os.environ[FASTNLP_GLOBAL_RANK] = old_fastnlp_global_rank
      else:
          os.environ.pop(FASTNLP_GLOBAL_RANK)
  
file_path: fastNLP/fastNLP/envs/distributed.py
imports: import os
  from functools import wraps
  from pathlib import Path
  from typing import Callable, Any, Optional, Union
  from contextlib import contextmanager
  from fastNLP.envs.env import FASTNLP_GLOBAL_RANK, FASTNLP_NO_SYNC
label_desc: Use image node_id 5 for calling a global function with example usage: all_rank_call_context() without return types