code: def test_multiclient_mode(pattern):
      """
      Testing NetGear's Multi-Client Mode with three unique clients
      """
      # define and activate Multi-Client Mode
      options = {
          "multiclient_mode": True,
          "bidirectional_mode": True,
          "jpeg_compression": False,
      }  # bidirectional_mode is activated for testing only
  
      # initialize
      frame_client = None
      stream = None
      server = None
      client_1 = None
      client_2 = None
      client_3 = None
      try:
          # open network stream
          options_gear = {"THREAD_TIMEOUT": 60}
          stream = VideoGear(
              source=return_testvideo_path(), **options_gear
          ).start()
          # define single server
          server = NetGear(
              pattern=pattern,
              port=["5556", "5557", "5558"],
              logging=True,
              **options,
          )
          # define a three unique clients
          client_1 = NetGear(
              port="5556",
              pattern=pattern,
              receive_mode=True,
              logging=True,
              **options,
          )
          client_2 = NetGear(
              port="5557",
              pattern=pattern,
              receive_mode=True,
              logging=True,
              **options,
          )
          client_3 = NetGear(
              port="5558",
              pattern=pattern,
              receive_mode=True,
              logging=True,
              **options,
          )
          i = 0
          while i < random.randint(10, 100):
              frame_client = stream.read()
              i += 1
          # check if input frame is valid
          assert not (frame_client is None)
  
          # send frame from 1 server to multiple clients
          server.send(
              frame_client,
              message="data" if pattern == 1 else "",
          )
          frame_1 = client_1.recv()
          server.send(
              frame_client,
              message="data" if pattern == 1 else "",
          )
          frame_2 = client_2.recv()
          server.send(
              frame_client,
              message="data" if pattern == 1 else "",
          )
          frame_3 = client_3.recv()
  
          # check if received frames from server exactly matches input frame
          assert np.array_equal(
              frame_1[1] if pattern == 1 else frame_1, frame_client
          )
          assert np.array_equal(
              frame_2[1] if pattern == 1 else frame_2, frame_client
          )
          assert np.array_equal(
              frame_3[1] if pattern == 1 else frame_3, frame_client
          )
  
      except Exception as e:
          if isinstance(
              e, (ZMQError, ValueError, RuntimeError, queue.Empty)
          ):
              pytest.xfail(str(e))
          else:
              pytest.fail(str(e))
      finally:
          # clean resources
          if not (stream is None):
              stream.stop()
          if not (server is None):
              server.close()
          if not (client_1 is None):
              client_1.close()
          if not (client_2 is None):
              client_1.close()
          if not (client_3 is None):
              client_1.close()
  
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 9 for calling a global function with example usage: test_multiclient_mode(pattern) without return types