code: def _correlation_cost_grad(op, grad_output):
      kernel_size = op.get_attr("kernel_size")
      max_displacement = op.get_attr("max_displacement")
      stride_1 = op.get_attr("stride_1")
      stride_2 = op.get_attr("stride_2")
      pad = op.get_attr("pad")
      data_format = op.get_attr("data_format")
  
      input_a = tf.convert_to_tensor(op.inputs[0], name="input_a")
      input_b = tf.convert_to_tensor(op.inputs[1], name="input_b")
      grad_output_tensor = tf.convert_to_tensor(
          grad_output, name="grad_output"
      )
  
      op_call = _correlation_cost_so.ops.addons_correlation_cost_grad
      grads = op_call(
          input_a,
          input_b,
          grad_output_tensor,
          kernel_size=kernel_size,
          max_displacement=max_displacement,
          stride_1=stride_1,
          stride_2=stride_2,
          pad=pad,
          data_format=data_format,
      )
  
      grad_input_a = tf.convert_to_tensor(grads[0], name="grad_input_a")
      grad_input_b = tf.convert_to_tensor(grads[1], name="grad_input_b")
      return [grad_input_a, grad_input_b]
  
file_path: addons/tensorflow_addons/layers/optical_flow.py
imports: import tensorflow
  from typeguard import typechecked
  from tensorflow_addons.utils.resource_loader import LazySO
label_desc: Use image node_id 2 for calling a global function with example usage: _correlation_cost_grad(op, grad_output) and returns: list