code: def cache_settings():
      s = CacheSettings()
      if s.cache_provider is None:
          return None
      try:
          return RedisSettings()
      except pydantic.ValidationError:
          pass
      try:
          return NativeCacheSettings()
      except pydantic.ValidationError:
          pass
  
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 1 for calling a global function with example usage: cache_settings() and returns: None, RedisSettings, NativeCacheSettings