code: def test_jumpstart_models_cache_set_reset_fxs(mock_model_cache: Mock):
      # test change of region resets cache
      accessors.JumpStartModelsAccessor.get_model_header(
          region="us-west-2",
          model_id="pytorch-ic-mobilenet-v2",
          version="*",
      )
  
      accessors.JumpStartModelsAccessor.get_model_specs(
          region="us-west-2",
          model_id="pytorch-ic-mobilenet-v2",
          version="*",
      )
  
      mock_model_cache.assert_called_once()
      mock_model_cache.reset_mock()
  
      accessors.JumpStartModelsAccessor.get_model_header(
          region="us-east-2",
          model_id="pytorch-ic-mobilenet-v2",
          version="*",
      )
  
      mock_model_cache.assert_called_once()
      mock_model_cache.reset_mock()
  
      accessors.JumpStartModelsAccessor.get_model_specs(
          region="us-west-1",
          model_id="pytorch-ic-mobilenet-v2",
          version="*",
      )
      mock_model_cache.assert_called_once()
      mock_model_cache.reset_mock()
  
      # test set_cache_kwargs
      accessors.JumpStartModelsAccessor.set_cache_kwargs(
          cache_kwargs={"some": "kwarg"}
      )
      mock_model_cache.assert_called_once_with(some="kwarg")
      mock_model_cache.reset_mock()
  
      accessors.JumpStartModelsAccessor.set_cache_kwargs(
          region="us-west-2", cache_kwargs={"some": "kwarg"}
      )
      mock_model_cache.assert_called_once_with(
          region="us-west-2", some="kwarg"
      )
      mock_model_cache.reset_mock()
  
      # test reset cache
      accessors.JumpStartModelsAccessor.reset_cache(
          cache_kwargs={"some": "kwarg"}
      )
      mock_model_cache.assert_called_once_with(some="kwarg")
      mock_model_cache.reset_mock()
  
      accessors.JumpStartModelsAccessor.reset_cache(
          region="us-west-2", cache_kwargs={"some": "kwarg"}
      )
      mock_model_cache.assert_called_once_with(
          region="us-west-2", some="kwarg"
      )
      mock_model_cache.reset_mock()
  
      accessors.JumpStartModelsAccessor.reset_cache()
      mock_model_cache.assert_called_once_with()
      mock_model_cache.reset_mock()
  
      # validate region and cache kwargs utility
      assert {
          "some": "kwarg"
      } == accessors.JumpStartModelsAccessor._validate_and_mutate_region_cache_kwargs(
          {"some": "kwarg"}, "us-west-2"
      )
      assert {
          "some": "kwarg"
      } == accessors.JumpStartModelsAccessor._validate_and_mutate_region_cache_kwargs(
          {"some": "kwarg", "region": "us-west-2"}, "us-west-2"
      )
  
      with pytest.raises(ValueError):
          accessors.JumpStartModelsAccessor._validate_and_mutate_region_cache_kwargs(
              {"some": "kwarg", "region": "us-east-2"}, "us-west-2"
          )
  
      # necessary because accessors is a static module
      reload(accessors)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/jumpstart/test_accessors.py
imports: from __future__ import absolute_import
  from io import BytesIO
  from unittest import TestCase
  from mock.mock import Mock, patch
  import pytest
  from sagemaker.jumpstart import accessors
  from tests.unit.sagemaker.jumpstart.constants import BASE_MANIFEST
  from tests.unit.sagemaker.jumpstart.utils import get_header_from_base_header, get_spec_from_base_spec
  from importlib import reload
label_desc: Use image node_id 3 for calling a global function with example usage: test_jumpstart_models_cache_set_reset_fxs(mock_model_cache) without return types