code: def _grouped_reducescatter_grad(op, *grads):
      """Gradient for the grouped reducescatter op.
  
      Args:
        op: An operation.
        grads: List of `Tensor` gradients with respect to the outputs of the op.
  
      Returns:
        The gradients with respect to the inputs of the op.
      """
      ignore_name_scope = op.get_attr("ignore_name_scope")
      process_set_id = op.get_attr("process_set_id")
      reduce_op = op.get_attr("reduce_op")
      prescale_factor = op.get_attr("prescale_factor")
      postscale_factor = op.get_attr("postscale_factor")
      process_set = _temp_process_set_object(process_set_id)
      if reduce_op == Sum:
          grads = [grad * process_set.size() for grad in grads]
      if prescale_factor != 1.0:
          grads = [grad * prescale_factor for grad in grads]
      if postscale_factor != 1.0:
          grads = [grad * postscale_factor for grad in grads]
      # Not using grouped_allgather here because all its input tensors need to be of the same dtype, but TensorFlow may
      # give us float32 zero gradients here despite non-zero gradients being, e.g, float64.
      return [
          allgather(
              g,
              ignore_name_scope=ignore_name_scope,
              process_set=process_set,
          )
          for g in grads
      ]
  
imports: import re
  import tensorflow
  from tensorflow.python.framework import load_library
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import resource_loader
  from horovod.common.util import check_installed_version, get_ext_suffix, get_average_backwards_compatibility_fun, gpu_available, num_rank_is_power_2
  from horovod.common.basics import HorovodBasics
  from horovod.common.process_sets import _setup
  from horovod.common.process_sets import ProcessSet, global_process_set, add_process_set, remove_process_set, _temp_process_set_object
  from horovod.tensorflow.util import _executing_eagerly
label_desc: Use image node_id 21 for calling a global function with example usage: _grouped_reducescatter_grad(op) and returns: unknown