def METHOD_NAME(*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)