code: def create(
      name: Tag | str,
      *,
      module: str = "",
      api_version: str | None = None,
      signatures: ModelSignaturesType,
      labels: dict[str, t.Any] | None = None,
      options: ModelOptions | None = None,
      custom_objects: dict[str, t.Any] | None = None,
      external_modules: t.List[ModuleType] | None = None,
      metadata: dict[str, t.Any] | None = None,
      context: ModelContext,
      _model_store: ModelStore = Provide[BentoMLContainer.model_store],
  ) -> t.Generator[Model, None, None]:
      options = ModelOptions() if options is None else options
      api_version = "v1" if api_version is None else api_version
      res = Model.create(
          name,
          module=module,
          api_version=api_version,
          labels=labels,
          signatures=signatures,
          options=options,
          custom_objects=custom_objects,
          metadata=metadata,
          context=context,
      )
      external_modules = (
          [] if external_modules is None else external_modules
      )
      imported_modules: t.List[ModuleType] = []
      try:
          res.enter_cloudpickle_context(
              external_modules, imported_modules
          )
          yield res
      except Exception:
          raise
      else:
          res.flush()
          res.save(_model_store)
          track(
              ModelSaveEvent(
                  module=res.info.module,
                  model_size_in_kb=calc_dir_size(res.path_of("/"))
                  / 1024,
              ),
          )
      finally:
          res.exit_cloudpickle_context(imported_modules)
  
imports: from __future__ import annotations
  import typing
  from contextlib import contextmanager
  from types import ModuleType
  from typing import TYPE_CHECKING
  from simple_di import Provide
  from simple_di import inject
  from ._internal.configuration.containers import BentoMLContainer
  from ._internal.models import Model
  from ._internal.models import ModelContext
  from ._internal.models import ModelOptions
  from ._internal.tag import Tag
  from ._internal.utils import calc_dir_size
  from ._internal.utils.analytics import ModelSaveEvent
  from ._internal.utils.analytics import track
  from .exceptions import BentoMLException
label_desc: Use image node_id 10 for calling a global function with example usage: create(name) without return types