code: def _forward(
      input_a,
      input_b,
      kernel_size,
      max_displacement,
      stride_1,
      stride_2,
      pad,
      data_format,
  ):
      input_a_op = tf.convert_to_tensor(input_a, dtype=tf.float32)
      input_b_op = tf.convert_to_tensor(input_b, dtype=tf.float32)
  
      output = CorrelationCost(
          kernel_size=kernel_size,
          max_displacement=max_displacement,
          stride_1=stride_1,
          stride_2=stride_2,
          pad=pad,
          data_format=data_format,
      )([input_a_op, input_b_op])
  
      return output
  
file_path: addons/tensorflow_addons/layers/tests/optical_flow_test.py
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.layers.optical_flow import CorrelationCost
label_desc: Use image node_id 1 for calling a global function with example usage: _forward(input_a, input_b, kernel_size, max_displacement, stride_1, stride_2, pad, data_format) and returns: output