code: def test_is_valid_model_id_true(
      self,
      mock_get_model_specs: Mock,
      mock_get_manifest: Mock,
  ):
      mock_get_manifest.return_value = [
          Mock(model_id="ay"),
          Mock(model_id="bee"),
          Mock(model_id="see"),
      ]
  
      mock_session_value = DEFAULT_JUMPSTART_SAGEMAKER_SESSION
      mock_s3_client_value = mock_session_value.s3_client
  
      patched = partial(
          utils.is_valid_model_id, sagemaker_session=mock_session_value
      )
  
      with patch(
          "sagemaker.jumpstart.utils.is_valid_model_id", patched
      ):
          self.assertTrue(utils.is_valid_model_id("bee"))
          mock_get_manifest.assert_called_once_with(
              region=JUMPSTART_DEFAULT_REGION_NAME,
              s3_client=mock_s3_client_value,
          )
          mock_get_model_specs.assert_not_called()
  
          mock_get_manifest.reset_mock()
          mock_get_model_specs.reset_mock()
  
          mock_get_manifest.return_value = [
              Mock(model_id="ay"),
              Mock(model_id="bee"),
              Mock(model_id="see"),
          ]
  
          mock_get_model_specs.return_value = Mock(
              training_supported=True
          )
          self.assertTrue(
              utils.is_valid_model_id(
                  "bee", script=JumpStartScriptScope.TRAINING
              )
          )
          mock_get_manifest.assert_called_once_with(
              region=JUMPSTART_DEFAULT_REGION_NAME,
              s3_client=mock_s3_client_value,
          )
  
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 1 for calling the TestIsValidModelId obj's underlying member method code with example usage: obj.test_is_valid_model_id_true(mock_get_model_specs, mock_get_manifest) without return types