code: def _validate_output_list_for_rank(my_rank, dst, gather_list):
      if dst == my_rank:
          if not gather_list:
              raise ValueError(
                  "Argument ``gather_list`` must be specified on destination rank."
              )
      elif gather_list:
          raise ValueError(
              "Argument ``gather_list`` must NOT be specified "
              "on non-destination ranks."
          )
  
file_path: fastNLP/fastNLP/core/drivers/paddle_driver/dist_utils.py
imports: import io
  import pickle
  import os
  from typing import Any, List
  import numpy
  from fastNLP.envs.imports import _NEED_IMPORT_PADDLE
  from fastNLP.envs.env import FASTNLP_NO_SYNC
  from fastNLP.core.utils import paddle_move_data_to_device
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_output_list_for_rank(my_rank, dst, gather_list) without return types