code: def _zero_out_grad(op, grad):
      """The gradients for `zero_out`.
  
      Args:
        op: The `zero_out` `Operation` that we are differentiating, which we can use
          to find the inputs and outputs of the original op.
        grad: Gradient with respect to the output of the `zero_out` op.
  
      Returns:
        Gradients with respect to the input of `zero_out`.
      """
      to_zero = op.inputs[0]
      shape = array_ops.shape(to_zero)
      index = array_ops.zeros_like(shape)
      first_grad = array_ops.reshape(grad, [-1])[0]
      to_zero_grad = sparse_ops.sparse_to_dense(
          [index], shape, first_grad, 0
      )
      return [to_zero_grad]
  
imports: from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import sparse_ops
label_desc: Use image node_id 1 for calling a global function with example usage: _zero_out_grad(op, grad) and returns: list