(stat_list, max_size=4096)
return our_stats
Gather a `Statistics` list accross all processes/nodes

        Args:
            stat_list(list([`Statistics`])): list of statistics objects to
                gather accross all processes/nodes
            max_size(int): max buffer size to use

        Returns:
            our_stats(list([`Statistics`])): list of updated stats
Gather a `Statistics` list accross all processes/nodes
Gather a Statistics list accross all processes / nodes
def all_gather_stats_list(stat_list, max_size=4096):
        """
        Gather a `Statistics` list accross all processes/nodes

        Args:
            stat_list(list([`Statistics`])): list of statistics objects to
                gather accross all processes/nodes
            max_size(int): max buffer size to use

        Returns:
            our_stats(list([`Statistics`])): list of updated stats
        """
        # Get a list of world_size lists with len(stat_list) Statistics objects
        all_stats = all_gather_list(stat_list, max_size=max_size)

        our_rank = get_rank()
        our_stats = all_stats[our_rank]
        for other_rank, stats in enumerate(all_stats):
            if other_rank == our_rank:
                continue
            for i, stat in enumerate(stats):
                our_stats[i].update(stat, update_n_src_words=True)
        return our_stats
def all_gather_stats_list ( stat_list , max_size = 4096 ) : # Get a list of world_size lists with len(stat_list) Statistics objects all_stats = all_gather_list ( stat_list , max_size = max_size ) our_rank = get_rank ( ) our_stats = all_stats [ our_rank ] for other_rank , stats in enumerate ( all_stats ) : if other_rank == our_rank : continue for i , stat in enumerate ( stats ) : our_stats [ i ] . update ( stat , update_n_src_words = True ) return our_stats