code: def test_jumpstart_cache_gets_cleared_when_params_are_set(
      mock_boto3_client,
  ):
      cache = JumpStartModelsCache(
          s3_bucket_name="some_bucket",
          region="some_region",
          manifest_file_s3_key="some_key",
      )
  
      cache.clear = MagicMock()
      cache.set_s3_bucket_name("some_bucket")
      cache.clear.assert_not_called()
      cache.clear.reset_mock()
      cache.set_region("some_region")
      cache.clear.assert_not_called()
      cache.clear.reset_mock()
      cache.set_manifest_file_s3_key("some_key")
      cache.clear.assert_not_called()
  
      cache.clear.reset_mock()
  
      cache.set_s3_bucket_name("some_bucket1")
      cache.clear.assert_called_once()
      cache.clear.reset_mock()
      cache.set_region("some_region1")
      cache.clear.assert_called_once()
      cache.clear.reset_mock()
      cache.set_manifest_file_s3_key("some_key1")
      cache.clear.assert_called_once()
  
imports: from __future__ import absolute_import
  import copy
  import datetime
  import io
  import json
  from unittest.mock import Mock, call, mock_open
  from botocore.stub import Stubber
  import botocore
  from mock.mock import MagicMock
  import pytest
  from mock import patch
  from sagemaker.jumpstart.cache import JUMPSTART_DEFAULT_MANIFEST_FILE_S3_KEY, JumpStartModelsCache
  from sagemaker.jumpstart.constants import ENV_VARIABLE_JUMPSTART_MANIFEST_LOCAL_ROOT_DIR_OVERRIDE, ENV_VARIABLE_JUMPSTART_SPECS_LOCAL_ROOT_DIR_OVERRIDE
  from sagemaker.jumpstart.types import JumpStartModelHeader, JumpStartModelSpecs, JumpStartVersionedModelId
  from tests.unit.sagemaker.jumpstart.utils import get_spec_from_base_spec, patched_retrieval_function
  from tests.unit.sagemaker.jumpstart.constants import BASE_MANIFEST, BASE_SPEC
  from sagemaker.jumpstart.utils import get_jumpstart_content_bucket
label_desc: Use image node_id 3 for calling a global function with example usage: test_jumpstart_cache_gets_cleared_when_params_are_set(mock_boto3_client) without return types