code: def _load_bento(bento: Bento, standalone_load: bool) -> "Service":
      # Use Bento's user project path as working directory when importing the service
      working_dir = bento._fs.getsyspath(BENTO_PROJECT_DIR_NAME)
  
      model_store = BentoMLContainer.model_store.get()
      # read from bento's local model store if it exists and is not empty
      # This is the case when running in a container
      local_model_store = bento._model_store
      if (
          local_model_store is not None
          and len(local_model_store.list()) > 0
      ):
          model_store = local_model_store
  
      # Read the model aliases
      resolved_model_aliases = {
          m.alias: str(m.tag) for m in bento.info.models if m.alias
      }
      BentoMLContainer.model_aliases.set(resolved_model_aliases)
  
      svc = import_service(
          bento.info.service,
          working_dir=working_dir,
          standalone_load=standalone_load,
          model_store=model_store,
      )
      on_load_bento(svc, bento)
      return svc
  
imports: from __future__ import annotations
  import importlib
  import logging
  import os
  import sys
  import typing
  from typing import TYPE_CHECKING
  import fs
  from simple_di import Provide
  from simple_di import inject
  from ...exceptions import BentoMLException
  from ...exceptions import ImportServiceError
  from ...exceptions import NotFound
  from ..bento import Bento
  from ..bento.bento import BENTO_PROJECT_DIR_NAME
  from ..bento.bento import BENTO_YAML_FILENAME
  from ..bento.bento import DEFAULT_BENTO_BUILD_FILE
  from ..bento.build_config import BentoBuildConfig
  from ..configuration import BENTOML_VERSION
  from ..configuration.containers import BentoMLContainer
  from ..models import ModelStore
  from ..tag import Tag
  from .service import on_load_bento
label_desc: Use image node_id 4 for calling a global function with example usage: _load_bento(bento, standalone_load) and returns: svc