code: def test_jumpstart_hyperparameter_instance_variants():
      hyperparams = (
          INSTANCE_TYPE_VARIANT.get_instance_specific_hyperparameters(
              instance_type="ml.g9.2xlarge"
          )
      )
      assert hyperparams == [
          JumpStartHyperparameter(
              {
                  "name": "num_bag_sets",
                  "type": "int",
                  "default": 5,
                  "min": 5,
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "num_stack_levels",
                  "type": "int",
                  "default": 6,
                  "min": 7,
                  "max": 3,
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "refit_full",
                  "type": "text",
                  "default": "False",
                  "options": ["True", "False"],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "set_best_to_refit_full",
                  "type": "text",
                  "default": "False",
                  "options": ["True", "False"],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "save_space",
                  "type": "text",
                  "default": "False",
                  "options": ["True", "False"],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "verbosity",
                  "type": "int",
                  "default": 2,
                  "min": 0,
                  "max": 4,
                  "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",
              }
          ),
      ]
  
      hyperparams = (
          INSTANCE_TYPE_VARIANT.get_instance_specific_hyperparameters(
              instance_type="ml.g9.12xlarge"
          )
      )
      assert hyperparams == [
          JumpStartHyperparameter(
              {
                  "name": "eval_metric",
                  "type": "text",
                  "default": "auto",
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "presets",
                  "type": "text",
                  "default": "medium_quality",
                  "options": [
                      "best_quality",
                      "high_quality",
                      "good_quality",
                      "medium_quality",
                      "optimize_for_deployment",
                      "interpretable",
                  ],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "auto_stack",
                  "type": "text",
                  "default": "False",
                  "options": ["True", "False"],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "num_bag_folds",
                  "type": "text",
                  "default": "0",
                  "options": [
                      "0",
                      "2",
                      "3",
                      "4",
                      "5",
                      "6",
                      "7",
                      "8",
                      "9",
                      "10",
                  ],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "num_bag_sets",
                  "type": "int",
                  "default": 1,
                  "min": 1,
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "num_stack_levels",
                  "type": "int",
                  "default": 0,
                  "min": 0,
                  "max": 3,
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "refit_full",
                  "type": "text",
                  "default": "False",
                  "options": ["True", "False"],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "set_best_to_refit_full",
                  "type": "text",
                  "default": "False",
                  "options": ["True", "False"],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "save_space",
                  "type": "text",
                  "default": "False",
                  "options": ["True", "False"],
                  "scope": "algorithm",
              }
          ),
          JumpStartHyperparameter(
              {
                  "name": "verbosity",
                  "type": "int",
                  "default": 2,
                  "min": 0,
                  "max": 4,
                  "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",
              }
          ),
      ]
  
      hyperparams = (
          INSTANCE_TYPE_VARIANT.get_instance_specific_hyperparameters(
              instance_type="ml.g77.2xlarge"
          )
      )
      assert hyperparams == []
  
      hyperparams = (
          INSTANCE_TYPE_VARIANT.get_instance_specific_hyperparameters(
              instance_type="ml.p2.2xlarge"
          )
      )
      assert hyperparams == []
  
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 5 for calling a global function with example usage: test_jumpstart_hyperparameter_instance_variants() without return types