code: def test_to_4D_image_with_unknown_shape():
      fn = tf.function(img_utils.to_4D_image).get_concrete_function(
          tf.TensorSpec(shape=None, dtype=tf.float32)
      )
      for shape in (2, 4), (2, 4, 1), (1, 2, 4, 1):
          exp = tf.ones(shape=(1, 2, 4, 1))
          res = fn(tf.ones(shape=shape))
          np.testing.assert_equal(exp.numpy(), res.numpy())
  
file_path: addons/tensorflow_addons/image/tests/utils_test.py
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.image import utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_to_4D_image_with_unknown_shape() without return types