code: def _get_library_settings_cache_provider(v: Optional[str]) -> str:
      if v is None:
          return "none"
      elif isinstance(v, dict):
          return v.get("cache_provider", "none")
      return getattr(v, "cache_provider", "none")
  
file_path: modelkit/modelkit/core/settings.py
imports: from typing import Optional, Union
  import pydantic
  import pydantic_settings
  from typing_extensions import Annotated
label_desc: Use image node_id 2 for calling a global function with example usage: _get_library_settings_cache_provider(v) and returns: getattr, str, v