code: def test_write_read_2_layer_png(tmpdir):
      """When writing 2 channel images (e.g. flow) they are padded to RGB by adding a 0 blue channel."""
      filename = tmpdir / "2_layer_uint16.png"
      img_data = np.arange(0, 65536, 32, dtype=np.uint16).reshape(
          (32, 32, 2)
      )
      file_io.write_png(img_data, filename)
      img_data_recovered = file_io.read_png(filename)
      img_data_padded = np.concatenate(
          [img_data, np.zeros_like(img_data[:, :, :1])], axis=-1
      )
      np.testing.assert_array_equal(img_data_recovered, img_data_padded)
  
file_path: kubric/test/test_fileio.py
imports: import numpy
  import pytest
  from kubric import file_io
label_desc: Use image node_id 6 for calling a global function with example usage: test_write_read_2_layer_png(tmpdir) without return types