code: def one_hot_grad(x, y):
      cat_ohe = tf.one_hot(
          indices=tf.cast(x, tf.int32), depth=tf.shape(y)[0]
      )
  
      def grad(dy):
          """Let gradients pass through."""
          return tf.reduce_sum(dy), None
  
      return cat_ohe, grad
  
imports: import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: one_hot_grad(x, y) and returns: cat_ohe,  grad, tf,  None