code: def test_client_truncates_metric_keys():
      client = MlflowAutologgingQueueingClient()
      metrics_to_log = {
          "a" * (MAX_ENTITY_KEY_LENGTH + 5): 1,
          "b" * (MAX_ENTITY_KEY_LENGTH + 50): 2,
      }
  
      with mlflow.start_run() as run:
          client.log_metrics(
              run_id=run.info.run_id, metrics=metrics_to_log
          )
          client.flush()
  
      run_metrics = get_run_data(run.info.run_id)[1]
      assert run_metrics == _truncate_dict(
          metrics_to_log, max_key_length=MAX_ENTITY_KEY_LENGTH
      )
  
imports: import time
  from unittest import mock
  import pytest
  import mlflow
  from mlflow import MlflowClient
  from mlflow.exceptions import MlflowException
  from mlflow.utils import _truncate_dict
  from mlflow.utils.autologging_utils import MlflowAutologgingQueueingClient
  from mlflow.utils.validation import MAX_ENTITY_KEY_LENGTH, MAX_METRICS_PER_BATCH, MAX_PARAM_VAL_LENGTH, MAX_PARAMS_TAGS_PER_BATCH, MAX_TAG_VAL_LENGTH
label_desc: Use image node_id 4 for calling a global function with example usage: test_client_truncates_metric_keys() without return types