class_docstr: Collective scatter communication.
class_docstr_tok: ["Collective","scatter","communication","."]
code: def backward(self, inputs, grad_outputs):
      xp = backend.get_array_module(*inputs)
      (gy,) = grad_outputs
      gy_dtype = gy.dtype
  
      # convert to float32 for communication
      if numpy.float16 == gy_dtype:
          gy = gy.astype(numpy.float32)
  
      gxs = self.comm.gather(gy, self.root)
  
      if self.comm.rank == self.root:
          # convert back
          if numpy.float16 == gy_dtype:
              gxs = tuple([item.astype(gy_dtype) for item in gxs])
          return gxs
  
      else:
          # Slave processes need to maintain input/output shapes.
          if inputs == ():
              dummy_var = tuple([xp.array([], dtype=xp.float32)])
          else:
              dummy_var = tuple([xp.zeros_like(x) for x in inputs])
          return dummy_var
  
imports: import chainer
  from chainer import backend
  import numpy
label_desc: Use image node_id 4 for calling the Scatter obj's underlying member method code with example usage: obj.backward(inputs, grad_outputs) and returns: gxs, dummy_var