code: def test_keras(data_format):
      # Unable to use `layer_test` as this layer has multiple inputs.
      val_a, val_b = _create_test_data(data_format)
  
      input_a = tf.keras.Input(shape=val_a.shape[1:])
      input_b = tf.keras.Input(shape=val_b.shape[1:])
  
      layer = CorrelationCost(
          kernel_size=1,
          max_displacement=2,
          stride_1=1,
          stride_2=2,
          pad=4,
          data_format=data_format,
      )
  
      expected_output_shape = tuple(
          layer.compute_output_shape([input_a.shape, input_b.shape])
      )
  
      x = [input_a, input_b]
      y = layer(x)
      model = tf.keras.models.Model(x, y)
      actual_output = model([val_a, val_b])
  
      expected_output_type = "float32"
      assert tf.keras.backend.dtype(y[0]) == expected_output_type
      assert actual_output.shape[1:] == expected_output_shape[0][1:]
  
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 5 for calling a global function with example usage: test_keras(data_format) without return types