code: def test_random_name_generation():
      from mlflow.utils import name_utils
  
      # Validate exhausted loop truncation
      name = name_utils._generate_random_name(max_length=8)
      assert len(name) == 8
  
      # Validate default behavior while calling 1000 times that names end in integer
      names = [name_utils._generate_random_name() for i in range(1000)]
      assert all(len(name) <= 20 for name in names)
      assert all(name[-1].isnumeric() for name in names)
  
file_path: mlflow/tests/utils/test_utils.py
imports: from unittest import mock
  import pytest
  from mlflow.utils import _chunk_dict, _get_fully_qualified_class_name, _truncate_dict, get_unique_resource_id, merge_dicts
label_desc: Use image node_id 8 for calling a global function with example usage: test_random_name_generation() without return types