class_docstr: Return a value for a global setting according to configuration precedence.
  
  The following methods are searched in order for the setting:
  
  7. immediately supplied values
  6. previously user-set values (e.g. set from command line)
  5. user-specified config override file
  4. environment variable
  3. local user config file
  2. global system config file (not yet implemented)
  1. local defaults
  0. global defaults
  
  Ref: https://stackoverflow.com/a/11077282/3406693
  
  If a value cannot be determined, a ValueError is raised.
  
  The ``env_var`` argument specifies the name of an environment to check for
  setting values, e.g. ``"BOKEH_LOG_LEVEL"``.
  
  The optional ``default`` argument specified an implicit default value for
  the setting that is returned if no other methods provide a value.
  
  A ``convert`` agument may be provided to convert values before they are
  returned. For instance to concert log levels in environment variables
  to ``logging`` module values.
class_docstr_tok: ["Return","a","value","for","a","global","setting","according","to","configuration","precedence",".","The","following","methods","are","searched","in","order","for","the","setting",":","7.","immediately","supplied","values","6.","previously","user-set","values","(","e.g",".","set","from","command","line",")","5.","user-specified","config","override","file","4.","environment","variable","3.","local","user","config","file","2.","global","system","config","file","(","not","yet","implemented",")","1.","local","defaults","0.","global","defaults","Ref",":","https",":","\/\/stackoverflow.com\/a\/11077282\/3406693","If","a","value","can","not","be","determined",",","a","ValueError","is","raised",".","The","``","env_var","``","argument","specifies","the","name","of","an","environment","to","check","for","setting","values",",","e.g",".","``","``","BOKEH_LOG_LEVEL","''","``",".","The","optional","``","default","``","argument","specified","an","implicit","default","value","for","the","setting","that","is","returned","if","no","other","methods","provide","a","value",".","A","``","convert","``","agument","may","be","provided","to","convert","values","before","they","are","returned",".","For","instance","to","concert","log","levels","in","environment","variables","to","``","logging","``","module","values","."]
docstr: Return the setting value according to the standard precedence.
  
  Args:
      value (any, optional):
          An optional immediate value. If not None, the value will
          be converted, then returned.
  
      default (any, optional):
          An optional default value that only takes precendence over
          implicit default values specified on the property itself.
  
  Returns:
      str or int or float
  
  Raises:
      RuntimeError
docstr_tok: ["Return","the","setting","value","according","to","the","standard","precedence",".","Args",":","value","(","any",",","optional",")",":","An","optional","immediate","value",".","If","not","None",",","the","value","will","be","converted",",","then","returned",".","default","(","any",",","optional",")",":","An","optional","default","value","that","only","takes","precendence","over","implicit","default","values","specified","on","the","property","itself",".","Returns",":","str","or","int","or","float","Raises",":","RuntimeError"]
code: def __call__(
      self, value: T | str | None = None, default: Unset[T] = _Unset
  ) -> T:
      """Return the setting value according to the standard precedence.
  
      Args:
          value (any, optional):
              An optional immediate value. If not None, the value will
              be converted, then returned.
  
          default (any, optional):
              An optional default value that only takes precendence over
              implicit default values specified on the property itself.
  
      Returns:
          str or int or float
  
      Raises:
          RuntimeError
      """
  
      # 7. immediate values
      if value is not None:
          return self._convert(value)
  
      # 6. previously user-set value
      if self._user_value is not _Unset:
          return self._convert(self._user_value)
  
      # 5. user-named config file
      if self._parent and self._name in self._parent.config_override:
          return self._convert(self._parent.config_override[self._name])
  
      # 4. environment variable
      if self._env_var and self._env_var in os.environ:
          return self._convert(os.environ[self._env_var])
  
      # 3. local config file
      if self._parent and self._name in self._parent.config_user:
          return self._convert(self._parent.config_user[self._name])
  
      # 2. global config file
      if self._parent and self._name in self._parent.config_system:
          return self._convert(self._parent.config_system[self._name])
  
      # 1.5 (undocumented) dev defaults take precedence over other defaults
      if is_dev() and self._dev_default is not _Unset:
          return self._convert(self._dev_default)
  
      # 1. local defaults
      if default is not _Unset:
          return self._convert(default)
  
      # 0. global defaults
      if self._default is not _Unset:
          return self._convert(self._default)
  
      raise RuntimeError(
          f"No configured value found for setting {self._name!r}"
      )
  
imports: from __future__ import annotations
  import logging
  import os
  from os.path import join
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, Sequence, TypeVar, Union, cast
  import yaml
  from .util.deprecation import deprecated
  from .util.paths import bokehjs_path, server_path
label_desc: Use image node_id 2 for calling the PrioritizedSetting obj's underlying member method code with example usage: obj.__call__(value, default) and returns: self, self, self, self, self, self, self, self, self