code: def test_jumpstart_local_metadata_override_specs(
      mocked_open: Mock,
      mocked_is_dir: Mock,
      mocked_get_json_file_and_etag_from_s3: Mock,
      mock_emit_logs_based_on_model_specs,
  ):
      mocked_open.side_effect = [
          mock_open(read_data=json.dumps(BASE_MANIFEST)).return_value,
          mock_open(read_data=json.dumps(BASE_SPEC)).return_value,
      ]
  
      mocked_is_dir.return_value = True
      cache = JumpStartModelsCache(s3_bucket_name="some_bucket")
  
      model_id, version = (
          "tensorflow-ic-imagenet-inception-v3-classification-4",
          "2.0.0",
      )
      assert JumpStartModelSpecs(BASE_SPEC) == cache.get_specs(
          model_id=model_id, semantic_version_str=version
      )
  
      mocked_is_dir.assert_any_call(
          "/some/directory/metadata/specs/root"
      )
      mocked_is_dir.assert_any_call(
          "/some/directory/metadata/manifest/root"
      )
      assert mocked_is_dir.call_count == 4
      mocked_open.assert_any_call(
          "/some/directory/metadata/manifest/root/models_manifest.json",
          "r",
      )
      mocked_open.assert_any_call(
          "/some/directory/metadata/specs/root/community_models_specs/tensorflow-ic-imagenet-"
          "inception-v3-classification-4/specs_v2.0.0.json",
          "r",
      )
      assert mocked_open.call_count == 2
      mocked_get_json_file_and_etag_from_s3.assert_not_called()
  
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 12 for calling a global function with example usage: test_jumpstart_local_metadata_override_specs(mocked_open, mocked_is_dir, mocked_get_json_file_and_etag_from_s3, mock_emit_logs_based_on_model_specs) without return types