code: def leaky_relu(x, alpha=0.2):
      with tf.variable_scope("LeakyReLU"):
          alpha = tf.constant(alpha, dtype=x.dtype, name="alpha")
  
          @tf.custom_gradient
          def func(x):
              y = tf.maximum(x, x * alpha)
  
              @tf.custom_gradient
              def grad(dy):
                  dx = tf.where(y >= 0, dy, dy * alpha)
                  return dx, lambda ddx: tf.where(
                      y >= 0, ddx, ddx * alpha
                  )
  
              return y, grad
  
          return func(x)
  
imports: import numpy
  import tensorflow
  import dnnlib
  import dnnlib.tflib
label_desc: Use image node_id 13 for calling a global function with example usage: leaky_relu(x, alpha) and returns: func, y,  grad, dx,  function