class_docstr: Static class for storing the JumpStart models cache.
class_docstr_tok: ["Static","class","for","storing","the","JumpStart","models","cache","."]
docstr: Sets ``JumpStartModelsAccessor._cache`` and ``JumpStartModelsAccessor._curr_region``.
  
  Args:
      region (str): region for which to retrieve header/spec.
      cache_kwargs (dict): kwargs to pass to ``JumpStartModelsCache``.
docstr_tok: ["Sets","``","JumpStartModelsAccessor._cache","``","and","``","JumpStartModelsAccessor._curr_region","``",".","Args",":","region","(","str",")",":","region","for","which","to","retrieve","header\/spec",".","cache_kwargs","(","dict",")",":","kwargs","to","pass","to","``","JumpStartModelsCache","``","."]
code: def _set_cache_and_region(region: str, cache_kwargs: dict) -> None:
      """Sets ``JumpStartModelsAccessor._cache`` and ``JumpStartModelsAccessor._curr_region``.
  
      Args:
          region (str): region for which to retrieve header/spec.
          cache_kwargs (dict): kwargs to pass to ``JumpStartModelsCache``.
      """
      new_cache_kwargs = JumpStartModelsAccessor._validate_and_mutate_region_cache_kwargs(
          cache_kwargs, region
      )
      if (
          JumpStartModelsAccessor._cache is None
          or region != JumpStartModelsAccessor._curr_region
          or new_cache_kwargs != JumpStartModelsAccessor._cache_kwargs
      ):
          JumpStartModelsAccessor._cache = cache.JumpStartModelsCache(
              region=region, **cache_kwargs
          )
          JumpStartModelsAccessor._curr_region = region
          JumpStartModelsAccessor._cache_kwargs = new_cache_kwargs
  
imports: from __future__ import absolute_import
  import functools
  from typing import Any, Dict, List, Optional
  import boto3
  from sagemaker.deprecations import deprecated
  from sagemaker.jumpstart.types import JumpStartModelHeader, JumpStartModelSpecs
  from sagemaker.jumpstart import cache
  from sagemaker.jumpstart.constants import JUMPSTART_DEFAULT_REGION_NAME
label_desc: Use image node_id 6 for calling the JumpStartModelsAccessor obj's underlying member method code with example usage: obj._set_cache_and_region(region, cache_kwargs) without return types