code: def gradient_is_constant(x):
      result = x * x
  
      def grad(dr):
          return [dr]
  
      return result, grad
  
imports: from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.eager import record
  from tensorflow.python.eager import test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_grad
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import variables
label_desc: Use image node_id 2 for calling a global function with example usage: gradient_is_constant(x) and returns: result,  grad, list