code: def _create_test_data(data_format):
      # Produce test data for _forward_simple and _keras methods
      val_a = np.array(
          [
              [
                  [[0, -6, 9, 5], [1, -5, 10, 3], [2, -4, 11, 1]],
                  [[3, -3, 12, -1], [4, -2, 13, -3], [5, -1, 14, -5]],
              ],
              [
                  [[6, 0, 15, -7], [7, 1, 16, -9], [8, 2, 17, -11]],
                  [[9, 3, 18, -13], [10, 4, 19, -15], [11, 5, 20, -17]],
              ],
          ],
          dtype=np.float32,
      )
  
      # pylint: disable=too-many-function-args
      val_b = val_a.transpose(2, 3, 0, 1).reshape(2, 2, 3, 4)
      # pylint: enable=too-many-function-args
  
      if data_format == "channels_last":
          val_a = np.moveaxis(val_a, 1, -1)
          val_b = np.moveaxis(val_b, 1, -1)
  
      return val_a, val_b
  
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 2 for calling a global function with example usage: _create_test_data(data_format) and returns: val_a,  val_b