code: def test_failedchannels(size):
      """
      IO Test - made to fail with invalid channel lengths
      """
      np.random.seed(0)
      if len(size) > 1:
          random_data_1 = np.random.random(size=size[0]) * 255
          input_data_ch1 = random_data_1.astype(np.uint8)
          random_data_2 = np.random.random(size=size[1]) * 255
          input_data_ch3 = random_data_2.astype(np.uint8)
          writer = WriteGear("output.mp4", compression_mode=True)
          writer.write(input_data_ch1)
          writer.write(input_data_ch3)
          writer.close()
      else:
          random_data = np.random.random(size=size) * 255
          input_data = random_data.astype(np.uint8)
          writer = WriteGear(
              "output.mp4", compression_mode=True, logging=True
          )
          writer.write(input_data)
          writer.close()
  
file_path: vidgear/vidgear/tests/writer_tests/test_IO.py
imports: import numpy
  import pytest
  import platform
  from vidgear.gears import WriteGear
label_desc: Use image node_id 2 for calling a global function with example usage: test_failedchannels(size) without return types