code: def test_single_thread_publish_consume_queue():
      run_id = "test_run_id"
      run_data = RunData()
      async_logging_queue = AsyncLoggingQueue(
          run_data.consume_queue_data
      )
      async_logging_queue.activate()
      metrics_sent = []
      tags_sent = []
      params_sent = []
  
      for params, tags, metrics in _get_run_data():
          async_logging_queue.log_batch_async(
              run_id=run_id, metrics=metrics, tags=tags, params=params
          )
          metrics_sent += metrics
          tags_sent += tags
          params_sent += params
  
      async_logging_queue.flush()
  
      _assert_sent_received_data(
          metrics_sent,
          params_sent,
          tags_sent,
          run_data.received_metrics,
          run_data.received_params,
          run_data.received_tags,
      )
  
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 1 for calling a global function with example usage: test_single_thread_publish_consume_queue() without return types