code: def test_publish_multithread_consume_single_thread():
      run_id = "test_run_id"
      run_data = RunData(throw_exception_on_batch_number=[])
  
      async_logging_queue = AsyncLoggingQueue(
          run_data.consume_queue_data
      )
      async_logging_queue.activate()
  
      run_operations = []
      t1 = threading.Thread(
          target=_send_metrics_tags_params,
          args=(async_logging_queue, run_id, run_operations),
      )
      t2 = threading.Thread(
          target=_send_metrics_tags_params,
          args=(async_logging_queue, run_id, run_operations),
      )
  
      t1.start()
      t2.start()
      t1.join()
      t2.join()
  
      for run_operation in run_operations:
          run_operation.wait()
  
      assert (
          len(run_data.received_metrics)
          == 2 * METRIC_PER_BATCH * TOTAL_BATCHES
      )
      assert (
          len(run_data.received_tags)
          == 2 * TAGS_PER_BATCH * TOTAL_BATCHES
      )
      assert (
          len(run_data.received_params)
          == 2 * PARAMS_PER_BATCH * TOTAL_BATCHES
      )
  
imports: import io
  import pickle
  import random
  import threading
  import time
  import uuid
  import pytest
  from mlflow import MlflowException
  from mlflow.entities.metric import Metric
  from mlflow.entities.param import Param
  from mlflow.entities.run_tag import RunTag
  from mlflow.utils.async_logging.async_logging_queue import AsyncLoggingQueue
label_desc: Use image node_id 4 for calling a global function with example usage: test_publish_multithread_consume_single_thread() without return types