docstr: 给定 obj 将各个 rank 上的 obj 汇总到每个 obj 上。返回一个 list 对象，里面依次为各个 rank 对应的 obj 。
  
  :param obj:
  :param group:
docstr_tok: ["\u7ed9\u5b9a","obj","\u5c06\u5404\u4e2a","rank","\u4e0a\u7684","obj","\u6c47\u603b\u5230\u6bcf\u4e2a","obj","\u4e0a\u3002\u8fd4\u56de\u4e00\u4e2a","list","\u5bf9\u8c61\uff0c\u91cc\u9762\u4f9d\u6b21\u4e3a\u5404\u4e2a","rank","\u5bf9\u5e94\u7684","obj","\u3002",":","param","obj",":",":","param","group",":"]
code: def all_gather_object(self, obj, group=None) -> List:
      """
      给定 obj 将各个 rank 上的 obj 汇总到每个 obj 上。返回一个 list 对象，里面依次为各个 rank 对应的 obj 。
  
      :param obj:
      :param group:
      """
      if self.is_distributed():
          obj_list = fastnlp_torch_all_gather(obj, group=group)
          return obj_list
      return [obj]
  
file_path: fastNLP/fastNLP/core/metrics/backend/torch_backend/backend.py
imports: from typing import Any, List, Optional
  import numpy
  from fastNLP.core.metrics.backend import Backend
  from fastNLP.core.metrics.utils import AggregateMethodError
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP.core.drivers.torch_driver.dist_utils import fastnlp_torch_all_gather
label_desc: Use image node_id 9 for calling the TorchBackend obj's underlying member method code with example usage: obj.all_gather_object(obj, group) and returns: list, obj_list