code: def test_zmq_client(client):
      hostname = "127.0.0.1"
  
      assert client.config.hostname == hostname
  
      assert client.host == hostname
      assert len(client.producers) == 0
      assert len(client.consumers) == 0
  
      assert isinstance(client.producers, dict)
      assert len(client.producers) == 0
  
      assert isinstance(client.consumers, defaultdict)
      assert len(client.consumers) == 0
  
      QueueName = "QueueName"
  
      producer = client.add_producer(queue_name=QueueName)
      assert isinstance(producer, ZMQProducer)
      assert producer.address is not None
      assert producer.alive
      assert producer.queue_name == QueueName
  
      received_message = []
  
      class MyMessageHandler(AbstractMessageHandler):
          queue_name = QueueName
  
          @staticmethod
          def handle_message(message: bytes, *args, **kwargs):
              received_message.append(message)
  
      consumer = client.add_consumer(
          queue_name=QueueName,
          message_handler=MyMessageHandler,
          service_name="my-service",
      )
  
      consumer.run()
      # stdlib
      from time import sleep
  
      sleep(1)
      assert isinstance(consumer, ZMQConsumer)
      assert consumer.address is not None
      assert consumer.alive
      assert consumer.queue_name == QueueName
      assert consumer.address == producer.address
  
      assert len(client.producers) == 1
      assert len(client.consumers) == 1
      assert QueueName in client.producers
      assert QueueName in client.consumers
      assert len(client.consumers[QueueName]) > 0
  
      msg = b"My Message"
      response = client.send_message(
          message=msg,
          queue_name=QueueName,
          worker=consumer.id.encode(),
      )
  
      assert isinstance(response, SyftSuccess)
  
      sleep(0.5)
      # consumer.receive()
      assert len(received_message) == 1
  
      msg = b"My Message"
      response = client.send_message(
          message=msg, queue_name="random queue"
      )
      assert isinstance(response, SyftError)
  
      assert isinstance(client.close(), SyftSuccess)
      sleep(0.5)
      assert client.producers[QueueName].alive is False
      assert client.consumers[QueueName][0].alive is False
  
imports: from collections import defaultdict
  import random
  import sys
  from time import sleep
  from faker import Faker
  import pytest
  from zmq import Socket
  import syft
  from syft.service.queue.base_queue import AbstractMessageHandler
  from syft.service.queue.queue import QueueManager
  from syft.service.queue.zmq_queue import ZMQClient
  from syft.service.queue.zmq_queue import ZMQClientConfig
  from syft.service.queue.zmq_queue import ZMQConsumer
  from syft.service.queue.zmq_queue import ZMQProducer
  from syft.service.queue.zmq_queue import ZMQQueueConfig
  from syft.service.response import SyftError
  from syft.service.response import SyftSuccess
  from syft.util.util import get_queue_address
label_desc: Use image node_id 2 for calling a global function with example usage: test_zmq_client(client) without return types