code: def test_jumpstart_deprecated_model_warnings(mock_get_manifest):
      mock_get_manifest.return_value = []
  
      def make_deprecated_spec(*largs, **kwargs):
          spec = get_spec_from_base_spec(
              model_id="pytorch-eqa-bert-base-cased", version="*"
          )
          spec.deprecated = True
          return spec
  
      with patch("logging.Logger.warning") as mocked_warning_log:
          utils.emit_logs_based_on_model_specs(
              make_deprecated_spec(), "us-west-2", MOCK_CLIENT
          )
  
          mocked_warning_log.assert_called_once_with(
              "Using deprecated JumpStart model 'pytorch-eqa-bert-base-cased' and version '*'."
          )
  
      deprecated_message = "this model is deprecated"
  
      def make_deprecated_message_spec(*largs, **kwargs):
          spec = get_spec_from_base_spec(
              model_id="pytorch-eqa-bert-base-cased", version="*"
          )
          spec.deprecated_message = deprecated_message
          spec.deprecated = True
          return spec
  
      with patch("logging.Logger.warning") as mocked_warning_log:
          utils.emit_logs_based_on_model_specs(
              make_deprecated_message_spec(), "us-west-2", MOCK_CLIENT
          )
  
          mocked_warning_log.assert_called_once_with(deprecated_message)
  
      deprecate_warn_message = "warn-msg"
  
      def make_deprecated_warning_message_spec(*largs, **kwargs):
          spec = get_spec_from_base_spec(
              model_id="pytorch-eqa-bert-base-cased", version="*"
          )
          spec.deprecate_warn_message = deprecate_warn_message
          return spec
  
      with patch("logging.Logger.warning") as mocked_warning_log:
          utils.emit_logs_based_on_model_specs(
              make_deprecated_warning_message_spec(),
              "us-west-2",
              MOCK_CLIENT,
          )
          mocked_warning_log.assert_called_once_with(
              deprecate_warn_message,
          )
  
imports: from __future__ import absolute_import
  import os
  from unittest import TestCase
  from mock.mock import Mock, patch
  import pytest
  import random
  from sagemaker.jumpstart import utils
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION, ENV_VARIABLE_DISABLE_JUMPSTART_LOGGING, ENV_VARIABLE_JUMPSTART_CONTENT_BUCKET_OVERRIDE, ENV_VARIABLE_JUMPSTART_GATED_CONTENT_BUCKET_OVERRIDE, JUMPSTART_DEFAULT_REGION_NAME, JUMPSTART_GATED_AND_PUBLIC_BUCKET_NAME_SET, JUMPSTART_LOGGER, JUMPSTART_REGION_NAME_SET, JUMPSTART_RESOURCE_BASE_NAME, JumpStartScriptScope
  from functools import partial
  from sagemaker.jumpstart.enums import JumpStartTag, MIMEType
  from sagemaker.jumpstart.exceptions import DeprecatedJumpStartModelError, VulnerableJumpStartModelError
  from sagemaker.jumpstart.types import JumpStartModelHeader, JumpStartVersionedModelId
  from tests.unit.sagemaker.jumpstart.utils import get_spec_from_base_spec
  from mock import MagicMock
label_desc: Use image node_id 23 for calling a global function with example usage: test_jumpstart_deprecated_model_warnings(mock_get_manifest) and returns: spec, spec, spec