code: def _get_toolbar_mode() -> "Config.ToolbarMode.ValueType":
      config_key = "client.toolbarMode"
      config_value = config.get_option(config_key)
      enum_value: Optional["Config.ToolbarMode.ValueType"] = getattr(
          Config.ToolbarMode, config_value.upper()
      )
      if enum_value is None:
          allowed_values = ", ".join(
              k.lower() for k in Config.ToolbarMode.keys()
          )
          raise ValueError(
              f"Config {config_key!r} expects to have one of "
              f"the following values: {allowed_values}. "
              f"Current value: {config_value}"
          )
      return enum_value
  
imports: import asyncio
  import sys
  import uuid
  from enum import Enum
  from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Union
  import streamlit.elements.exception
  from streamlit import config, runtime, source_util
  from streamlit.case_converters import to_snake_case
  from streamlit.logger import get_logger
  from streamlit.proto.BackMsg_pb2 import BackMsg
  from streamlit.proto.ClientState_pb2 import ClientState
  from streamlit.proto.Common_pb2 import FileURLs, FileURLsRequest
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.proto.GitInfo_pb2 import GitInfo
  from streamlit.proto.NewSession_pb2 import Config, CustomThemeConfig, NewSession, UserInfo
  from streamlit.proto.PagesChanged_pb2 import PagesChanged
  from streamlit.runtime import caching, legacy_caching
  from streamlit.runtime.forward_msg_queue import ForwardMsgQueue
  from streamlit.runtime.metrics_util import Installation
  from streamlit.runtime.script_data import ScriptData
  from streamlit.runtime.scriptrunner import RerunData, ScriptRunner, ScriptRunnerEvent
  from streamlit.runtime.scriptrunner.script_cache import ScriptCache
  from streamlit.runtime.secrets import secrets_singleton
  from streamlit.runtime.uploaded_file_manager import UploadedFileManager
  from streamlit.version import STREAMLIT_VERSION_STRING
  from streamlit.watcher import LocalSourcesWatcher
label_desc: Use image node_id 2 for calling a global function with example usage: _get_toolbar_mode() and returns: enum_value