code: def two_outputs(a, b):
      mm = math_ops.matmul(a, b)
      r = math_ops.reduce_sum(mm)
  
      def grad(dmm, dr):
          return [
              math_ops.matmul(dmm, b, transpose_b=True)
              + math_ops.matmul(
                  array_ops.ones_like(b * dr), b, transpose_b=True
              ),
              math_ops.matmul(a, dmm, transpose_b=True)
              + math_ops.matmul(
                  a, array_ops.ones_like(a) * dr, transpose_b=True
              ),
          ]
  
      return [mm, r], 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 1 for calling a global function with example usage: two_outputs(a, b) and returns: list,  grad, list