code: def _dynamic_embedding_lookup_grad(op, grad):
      """The gradient for DynamicEmbeddingLookup.
  
      Args:
        op: The gen_de_op.dynamic_embedding_lookup() op.
        grad: The tensor representing the gradient w.r.t. the output of the
          gen_de_op.dynamic_embedding_lookup() op.
  
      Returns:
        The gradients w.r.t. the input of the gen_de_op.dynamic_embedding_lookup()
        op.
      """
      grad = tf.reshape(grad, [-1, grad.shape[-1]])
      return gen_carls_ops.dynamic_embedding_lookup_grad(
          op.inputs[0], grad, op.inputs[2]  # keys  # resource
      )
  
file_path: neural-structured-learning/research/carls/dynamic_embedding_ops.py
imports: import typing
  from research.carls import context
  from research.carls import dynamic_embedding_config_pb2
  from research.carls.kernels import gen_carls_ops
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: _dynamic_embedding_lookup_grad(op, grad) and returns: gen_carls_ops