code: def test_model_id_not_found_refeshes_cach_inference(
      self,
      mock_reset_cache: mock.Mock,
      mock_get_model_specs: mock.Mock,
      mock_session: mock.Mock,
      mock_retrieve_kwargs: mock.Mock,
      mock_model_init: mock.Mock,
      mock_is_valid_model_id: mock.Mock,
  ):
      mock_is_valid_model_id.side_effect = [False, False]
  
      model_id, _ = "js-trainable-model", "*"
  
      mock_retrieve_kwargs.return_value = {}
  
      mock_get_model_specs.side_effect = get_special_model_spec
  
      mock_session.return_value = sagemaker_session
  
      with pytest.raises(ValueError):
          JumpStartModel(
              model_id=model_id,
          )
  
      mock_reset_cache.assert_called_once_with()
      mock_is_valid_model_id.assert_has_calls(
          calls=[
              mock.call(
                  model_id="js-trainable-model",
                  model_version=None,
                  region=None,
                  script=JumpStartScriptScope.INFERENCE,
                  sagemaker_session=None,
              ),
              mock.call(
                  model_id="js-trainable-model",
                  model_version=None,
                  region=None,
                  script=JumpStartScriptScope.INFERENCE,
                  sagemaker_session=None,
              ),
          ]
      )
  
      mock_is_valid_model_id.reset_mock()
      mock_reset_cache.reset_mock()
  
      mock_is_valid_model_id.side_effect = [False, True]
      JumpStartModel(
          model_id=model_id,
      )
  
      mock_reset_cache.assert_called_once_with()
      mock_is_valid_model_id.assert_has_calls(
          calls=[
              mock.call(
                  model_id="js-trainable-model",
                  model_version=None,
                  region=None,
                  script=JumpStartScriptScope.INFERENCE,
                  sagemaker_session=None,
              ),
              mock.call(
                  model_id="js-trainable-model",
                  model_version=None,
                  region=None,
                  script=JumpStartScriptScope.INFERENCE,
                  sagemaker_session=None,
              ),
          ]
      )
  
imports: from __future__ import absolute_import
  from inspect import signature
  from typing import Optional, Set
  from unittest import mock
  import unittest
  from mock import MagicMock
  import pytest
  from sagemaker.async_inference.async_inference_config import AsyncInferenceConfig
  from sagemaker.jumpstart.artifacts.environment_variables import _retrieve_default_environment_variables
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION
  from sagemaker.jumpstart.enums import JumpStartScriptScope, JumpStartTag
  from sagemaker.jumpstart.model import JumpStartModel
  from sagemaker.model import Model
  from sagemaker.predictor import Predictor
  from sagemaker.session_settings import SessionSettings
  from sagemaker.enums import EndpointType
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
  from tests.unit.sagemaker.jumpstart.utils import get_special_model_spec, overwrite_dictionary, get_special_model_spec_for_inference_component_based_endpoint
label_desc: Use image node_id 16 for calling the ModelTest obj's underlying member method code with example usage: obj.test_model_id_not_found_refeshes_cach_inference(mock_reset_cache, mock_get_model_specs, mock_session, mock_retrieve_kwargs, mock_model_init, mock_is_valid_model_id) without return types