code: def _sync_loss(self, loss, loss_type):
      if self._world_size <= 1:
          return
  
      if loss_type == "single":
          if isinstance(loss, (int, float)):
              loss = [loss]
          if isinstance(loss, (list, np.ndarray)):
              loss = np.array(loss)
  
      if self._is_master():
          loss = torch.Tensor(loss).cuda(self._args.device)
          loss_list = [loss for _ in range(self._world_size)]
          dist.scatter(loss, loss_list, async_op=False)
      else:
          loss = torch.Tensor(loss).cuda(self._args.device)
          dist.scatter(loss, src=0, async_op=False)
          return loss[0].item()
  
imports: import logging
  import numpy
  import torch
  import torch.distributed
  from transformers.training_args import TrainingArguments
  from fate.ml.aggregator import AggregatorType, aggregator_map
label_desc: Use image node_id 8 for calling the AggregatorClientWrapper obj's underlying member method code with example usage: obj._sync_loss(loss, loss_type) and returns: loss