code: def test_async_logging_fluent_check_batch_split():
      # Check that batch is split into multiple requests if it exceeds the maximum size
      # and if we wait for RunOperations returned then at the end everything should be logged.
      experiment_name = (
          f"mlflow-async-logging-test-{str(uuid.uuid4())[:8]}"
      )
      experiment_id = mlflow.create_experiment(experiment_name)
  
      run_operations = []
  
      with mlflow.start_run(experiment_id=experiment_id) as run:
          run_id = run.info.run_id
  
          metrics_to_log = {
              f"batch metrics async-{metric_value}": metric_value
              for metric_value in range(0, 10000)
          }
  
          run_operations = mlflow.log_metrics(
              metrics=metrics_to_log,
              step=1,
              synchronous=False,
          )
  
          run_operations.wait()
  
      # Total 10000 metrics logged, max batch size =1000, so 10 requests will be sent.
      assert len(run_operations._operation_futures) == 10
  
      run = mlflow.run
      run = mlflow.get_run(run_id)
      for metric_key, metric_value in metrics_to_log.items():
          assert metric_key in run.data.metrics
          assert metric_value == run.data.metrics[metric_key]
  
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 4 for calling a global function with example usage: test_async_logging_fluent_check_batch_split() without return types