code: def test_compression(options_server):
      """
      Testing NetGear's real-time frame compression capabilities
      """
      # initialize
      stream = None
      server = None
      client = None
      try:
          # open streams
          options_gear = {"THREAD_TIMEOUT": 60}
          colorspace = (
              "COLOR_BGR2GRAY"
              if isinstance(options_server["jpeg_compression"], str)
              and options_server["jpeg_compression"].strip().upper()
              == "GRAY"
              else None
          )
          stream = VideoGear(
              source=return_testvideo_path(),
              colorspace=colorspace,
              **options_gear,
          ).start()
          client = NetGear(pattern=0, receive_mode=True, logging=True)
          server = NetGear(pattern=0, logging=True, **options_server)
          # send over network
          while True:
              frame_server = stream.read()
              if frame_server is None:
                  break
              server.send(frame_server)
              frame_client = client.recv()
              if (
                  isinstance(options_server["jpeg_compression"], str)
                  and options_server["jpeg_compression"].strip().upper()
                  == "GRAY"
              ):
                  assert (
                      frame_server.ndim == frame_client.ndim
                  ), "Grayscale frame Test Failed!"
      except Exception as e:
          if isinstance(
              e, (ZMQError, ValueError, RuntimeError, queue.Empty)
          ):
              logger.exception(str(e))
          else:
              pytest.fail(str(e))
      finally:
          # clean resources
          if not (stream is None):
              stream.stop()
          if not (server is None):
              server.close(kill=True)
          if not (client is None):
              client.close(kill=True)
  
imports: import os
  import platform
  import queue
  import cv2
  import numpy
  import pytest
  import random
  import logging
  import tempfile
  from zmq.error import ZMQError
  from vidgear.gears import NetGear, VideoGear
  from vidgear.gears.helper import logger_handler
label_desc: Use image node_id 5 for calling a global function with example usage: test_compression(options_server) without return types