code: def _fully_connected_grad(op: ops.Operation, grad):
      act = op.get_attr("act")
      y = op.outputs[0]
      if act == "RELU":
          grad = gen_nn_ops.relu_grad(grad, y)
      elif act == "RELU6":
          grad = gen_nn_ops.relu6_grad(grad, y)
      elif act == "TANH":
          y = math_ops.conj(y)
          grad = gen_math_ops.tanh_grad(y, grad)
  
      broadcast_shape = tf.shape(y)
      input_value_shape = tf.shape(op.inputs[2])
      _, reduction_axes = tf.raw_ops.BroadcastGradientArgs(
          s0=broadcast_shape, s1=input_value_shape
      )
      updates_grad_reshaped = tf.reduce_sum(
          grad, axis=reduction_axes, keepdims=True
      )
      bias_grad = tf.reshape(updates_grad_reshaped, input_value_shape)
  
      a = math_ops.conj(op.inputs[0])
      b = math_ops.conj(op.inputs[1])
      grad_a = gen_math_ops.mat_mul(grad, b)
      grad_b = gen_math_ops.mat_mul(grad, a, transpose_a=True)
      return [grad_a, grad_b, bias_grad]
  
file_path: tensorflow-upstream/tensorflow/compiler/mlir/tfr/examples/mnist/ops_defs.py
imports: import os
  import sys
  from absl import app
  import tensorflow
  from tensorflow.compiler.mlir.tfr.python import composite
  from tensorflow.compiler.mlir.tfr.python.op_reg_gen import gen_register_op
  from tensorflow.compiler.mlir.tfr.python.tfr_gen import tfr_gen_from_module
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import flags
label_desc: Use image node_id 4 for calling a global function with example usage: _fully_connected_grad(op, grad) and returns: list