code: def env_manager(
      func: t.Callable[..., t.Any]
  ) -> t.Callable[..., t.Any]:
      @click.option(
          "--env",
          type=click.Choice(["conda"]),
          default=None,
          help="Environment to run the command in",
          show_default=True,
      )
      @functools.wraps(func)
      def wrapper(*args: t.Any, **kwargs: t.Any) -> t.Any:
          env = kwargs.pop("env")
          if env is not None:
              from rich.status import Status
  
              bento_identifier = kwargs["bento"]
              spinner_status = Status(f"Preparing {env} environment")
              if not get_debug_mode():
                  spinner_status.start()
                  bento_env = get_environment(bento_identifier, env)
                  spinner_status.stop()
              else:
                  bento_env = get_environment(bento_identifier, env)
  
              # once env is created, spin up a subprocess to run current arg
              bentoml_exec_path = which("bentoml")
              if bentoml_exec_path is None:
                  raise BentoMLException("bentoml command not found!")
              bento_env.run(
                  [bentoml_exec_path] + remove_env_arg(sys.argv[1:])
              )
  
          return func(*args, **kwargs)
  
      return wrapper
  
imports: from __future__ import annotations
  import functools
  import logging
  import os
  import re
  import sys
  import typing
  from shutil import which
  import click
  import fs
  from simple_di import Provide
  from simple_di import inject
  from bentoml._internal.bento.bento import BENTO_YAML_FILENAME
  from bentoml._internal.bento.bento import DEFAULT_BENTO_BUILD_FILE
  from bentoml._internal.bento.bento import Bento
  from bentoml._internal.bento.bento import BentoStore
  from bentoml._internal.configuration import get_debug_mode
  from bentoml._internal.configuration.containers import BentoMLContainer
  from bentoml._internal.env_manager import EnvManager
  from bentoml._internal.env_manager.envs import Environment
  from bentoml.exceptions import BentoMLException
  from bentoml.exceptions import NotFound
label_desc: Use image node_id 3 for calling a global function with example usage: env_manager(func) and returns: wrapper, func