code: def test_get_valid_service_name(caplog: LogCaptureFixture):
      from bentoml._internal.service.service import (
          get_valid_service_name,
      )
  
      with caplog.at_level(logging.WARNING):
          get_valid_service_name("NOT_LOWER")
      assert "to lowercase:" in caplog.text
  
file_path: BentoML/tests/unit/_internal/test_service_api.py
imports: from __future__ import annotations
  import logging
  from typing import TYPE_CHECKING
  import pytest
  import bentoml
  from bentoml.exceptions import BentoMLException
  from bentoml.io import Text
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_valid_service_name(caplog) without return types