code: def test_async_logging_mlflow_client():
      experiment_name = (
          f"mlflow-async-logging-test-{str(uuid.uuid4())[:8]}"
      )
      mlflow_client = MlflowClient()
      experiment_id = mlflow_client.create_experiment(experiment_name)
  
      run = mlflow_client.create_run(experiment_id=experiment_id)
      run_id = run.info.run_id
  
      run_operations = []
  
      params_to_log = []
      param1 = Param("async param 1", "async param 1 value")
      run_operations.append(
          mlflow_client.log_param(
              run_id, param1.key, param1.value, synchronous=False
          )
      )
      params_to_log.append(param1)
  
      tags_to_log = []
      tag1 = RunTag("async tag 1", "async tag 1 value")
      run_operations.append(
          mlflow_client.set_tag(
              run_id, tag1.key, tag1.value, synchronous=False
          )
      )
      tags_to_log.append(tag1)
  
      metrics_to_log = []
      metric1 = Metric("async metric 1", 1, 132, 0)
      run_operations.append(
          mlflow_client.log_metric(
              run_id,
              metric1.key,
              metric1.value,
              metric1.timestamp,
              metric1.step,
              synchronous=False,
          )
      )
      metrics_to_log.append(metric1)
  
      # Log batch of metrics
      metric_value = 1
      for _ in range(1, 5):
          metrics = []
          guid8 = str(uuid.uuid4())[:8]
          params = [
              Param(f"batch param-{guid8}-{val}", value=str(val))
              for val in range(1)
          ]
          tags = [
              RunTag(f"batch tag-{guid8}-{val}", value=str(val))
              for val in range(1)
          ]
          for _ in range(0, 50):
              metric_value += 1
              metrics.append(
                  Metric(
                      key=f"batch metrics async-{metric_value}",
                      value=time.time(),
                      timestamp=metric_value,
                      step=0,
                  )
              )
  
          params_to_log.extend(params)
          tags_to_log.extend(tags)
          metrics_to_log.extend(metrics)
          run_operation = mlflow_client.log_batch(
              run_id,
              params=params,
              tags=tags,
              metrics=metrics,
              synchronous=False,
          )
          run_operations.append(run_operation)
  
      for run_operation in run_operations:
          run_operation.wait()
  
      run = mlflow_client.get_run(run_id)
      for tag in tags_to_log:
          assert tag.key in run.data.tags
          assert tag.value == run.data.tags[tag.key]
      for param in params_to_log:
          assert param.key in run.data.params
          assert param.value == run.data.params[param.key]
      for metric in metrics_to_log:
          assert metric.key in run.data.metrics
          assert metric.value == run.data.metrics[metric.key]
  
      mlflow_client.set_terminated(
          run_id=run_id, status="FINISHED", end_time=time.time()
      )
  
file_path: mlflow/tests/integration/async_logging/test_async_logging_integration.py
imports: import io
  import pickle
  import time
  import uuid
  import mlflow
  from mlflow import MlflowClient
  from mlflow.entities.metric import Metric
  from mlflow.entities.param import Param
  from mlflow.entities.run_tag import RunTag
label_desc: Use image node_id 2 for calling a global function with example usage: test_async_logging_mlflow_client() without return types