code: def test_load_by_module_name():
      svc = import_service("bento_service_in_module.single_service")
      assert svc.name == "test-bento-service-in-module-single"
  
      svc = import_service("bento_service_in_module.single_service:svc")
      assert svc.name == "test-bento-service-in-module-single"
  
      svc = import_service("single_service_in_package")
      assert svc.name == "test-bento-service-in-package"
  
      svc = import_service("single_service_in_package:svc")
      assert svc.name == "test-bento-service-in-package"
  
imports: import pytest
  from bentoml._internal.service.loader import import_service
  from bentoml.exceptions import ImportServiceError
label_desc: Use image node_id 2 for calling a global function with example usage: test_load_by_module_name() without return types