code: def containerize(bento_tag: Tag | str, **kwargs: t.Any) -> bool:
      """
      DEPRECATED: Use :meth:`bentoml.container.build` instead.
      """
      from .container import build
  
      # Add backward compatibility for bentoml.bentos.containerize
      logger.warning(
          "'%s.containerize' is deprecated, use '%s.build' instead.",
          __name__,
          "bentoml.container",
      )
      if "docker_image_tag" in kwargs:
          kwargs["image_tag"] = kwargs.pop("docker_image_tag", None)
      if "labels" in kwargs:
          kwargs["label"] = kwargs.pop("labels", None)
      if "tags" in kwargs:
          kwargs["tag"] = kwargs.pop("tags", None)
      try:
          build(bento_tag, **kwargs)
          return True
      except Exception as e:  # pylint: disable=broad-except
          logger.error("Failed to containerize %s: %s", bento_tag, e)
          return False
  
imports: from __future__ import annotations
  import logging
  import os
  import re
  import subprocess
  import sys
  import tempfile
  import typing
  from simple_di import Provide
  from simple_di import inject
  from ._internal.bento import Bento
  from ._internal.bento.build_config import BentoBuildConfig
  from ._internal.configuration.containers import BentoMLContainer
  from ._internal.tag import Tag
  from ._internal.utils import resolve_user_filepath
  from .exceptions import BadInput
  from .exceptions import BentoMLException
  from .exceptions import InvalidArgument
label_desc: Use image node_id 11 for calling a global function with example usage: containerize(bento_tag) and returns: True, False