code: def test_multiple_images():
      images = tf.cast(
          [
              [[1, 1, 1, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 1, 1, 1]],
              [[1, 0, 0, 1], [0, 0, 0, 0], [0, 0, 0, 0], [1, 0, 0, 1]],
              [[1, 1, 0, 1], [0, 1, 1, 0], [1, 0, 1, 0], [0, 0, 1, 1]],
          ],
          tf.bool,
      )
      expected = [
          [[1, 1, 1, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 1, 1, 1]],
          [[2, 0, 0, 3], [0, 0, 0, 0], [0, 0, 0, 0], [4, 0, 0, 5]],
          [[6, 6, 0, 7], [0, 6, 6, 0], [8, 0, 6, 0], [0, 0, 6, 6]],
      ]
  
      np.testing.assert_equal(
          connected_components(images).numpy(), expected
      )
  
file_path: addons/tensorflow_addons/image/tests/connected_components_test.py
imports: import pytest
  import logging
  import tensorflow
  import numpy
  from tensorflow_addons.image.connected_components import connected_components
label_desc: Use image node_id 5 for calling a global function with example usage: test_multiple_images() without return types