code: def test_jumpstart_model_specs():
      specs1 = JumpStartModelSpecs(BASE_SPEC)
  
      assert specs1.model_id == "pytorch-ic-mobilenet-v2"
      assert specs1.version == "1.0.0"
      assert specs1.min_sdk_version == "2.49.0"
      assert specs1.training_supported
      assert specs1.incremental_training_supported
      assert specs1.hosting_ecr_specs == JumpStartECRSpecs(
          {
              "framework": "pytorch",
              "framework_version": "1.5.0",
              "py_version": "py3",
          }
      )
      assert specs1.training_ecr_specs == JumpStartECRSpecs(
          {
              "framework": "pytorch",
              "framework_version": "1.5.0",
              "py_version": "py3",
          }
      )
      assert (
          specs1.hosting_artifact_key
          == "pytorch-infer/infer-pytorch-ic-mobilenet-v2.tar.gz"
      )
      assert (
          specs1.training_artifact_key
          == "pytorch-training/train-pytorch-ic-mobilenet-v2.tar.gz"
      )
      assert (
          specs1.hosting_script_key
          == "source-directory-tarballs/pytorch/inference/ic/v1.0.0/sourcedir.tar.gz"
      )
      assert (
          specs1.training_script_key
          == "source-directory-tarballs/pytorch/transfer_learning/ic/v1.0.0/sourcedir.tar.gz"
      )
      assert specs1.hyperparameters == [
          JumpStartHyperparameter(
              {
                  "name": "epochs",
                  "type": "int",
                  "default": 3,
                  "min": 1,
                  "max": 1000,
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "adam-learning-rate",
                  "type": "float",
                  "default": 0.05,
                  "min": 1e-08,
                  "max": 1,
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "batch-size",
                  "type": "int",
                  "default": 4,
                  "min": 1,
                  "max": 1024,
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "sagemaker_submit_directory",
                  "type": "text",
                  "default": "/opt/ml/input/data/code/sourcedir.tar.gz",
                  "scope": "container",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "sagemaker_program",
                  "type": "text",
                  "default": "transfer_learning.py",
                  "scope": "container",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "sagemaker_container_log_level",
                  "type": "text",
                  "default": "20",
                  "scope": "container",
              }
          ),
      ]
  
      assert specs1.to_json() == BASE_SPEC
  
      BASE_SPEC["model_id"] = "diff model ID"
      specs2 = JumpStartModelSpecs(BASE_SPEC)
      assert specs1 != specs2
  
      specs3 = copy.deepcopy(specs1)
      assert specs3 == specs1
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/jumpstart/test_types.py
imports: from __future__ import absolute_import
  import copy
  from sagemaker.jumpstart.types import JumpStartECRSpecs, JumpStartHyperparameter, JumpStartInstanceTypeVariants, JumpStartModelSpecs, JumpStartModelHeader
  from tests.unit.sagemaker.jumpstart.constants import BASE_SPEC
label_desc: Use image node_id 3 for calling a global function with example usage: test_jumpstart_model_specs() without return types