code: def test_queue_activation():
      run_id = "test_run_id"
      run_data = RunData()
      async_logging_queue = AsyncLoggingQueue(
          run_data.consume_queue_data
      )
  
      assert not async_logging_queue._is_activated
  
      metrics = [
          Metric(
              key=f"batch metrics async-{val}",
              value=val,
              timestamp=val,
              step=0,
          )
          for val in range(METRIC_PER_BATCH)
      ]
      with pytest.raises(
          MlflowException, match="AsyncLoggingQueue is not activated."
      ):
          async_logging_queue.log_batch_async(
              run_id=run_id, metrics=metrics, tags=[], params=[]
          )
  
      async_logging_queue.activate()
      assert async_logging_queue._is_activated
  
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 2 for calling a global function with example usage: test_queue_activation() without return types