code: def test_load_by_service_file():
      svc = import_service("bento_service_in_module/single_service.py")
      assert svc.name == "test-bento-service-in-module-single"
  
      svc = import_service(
          "./bento_service_in_module/single_service.py:svc"
      )
      assert svc.name == "test-bento-service-in-module-single"
  
      svc = import_service("./single_service_in_package/__init__.py")
      assert svc.name == "test-bento-service-in-package"
  
      svc = import_service(
          "./single_service_in_package/__init__.py: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 1 for calling a global function with example usage: test_load_by_service_file() without return types