code: def test_algorithm_hyperparameter_integer_range_invalid_range(
      session,
  ):
      session.sagemaker_config = {}
      hyperparameters = [
          {
              "Description": "Grow a tree with max_leaf_nodes in best-first fashion.",
              "Type": "Integer",
              "Name": "max_leaf_nodes",
              "Range": {
                  "IntegerParameterRangeSpecification": {
                      "MinValue": "1",
                      "MaxValue": "100000",
                  }
              },
              "IsTunable": True,
              "IsRequired": False,
              "DefaultValue": "100",
          }
      ]
  
      some_algo = copy.deepcopy(DESCRIBE_ALGORITHM_RESPONSE)
      some_algo["TrainingSpecification"][
          "SupportedHyperParameters"
      ] = hyperparameters
  
      session.sagemaker_client.describe_algorithm = Mock(
          return_value=some_algo
      )
  
      estimator = AlgorithmEstimator(
          algorithm_arn="arn:aws:sagemaker:us-east-2:1234:algorithm/scikit-decision-trees",
          role="SageMakerRole",
          instance_type="ml.m4.2xlarge",
          instance_count=1,
          sagemaker_session=session,
      )
  
      with pytest.raises(ValueError):
          estimator.set_hyperparameters(max_leaf_nodes=0)
  
      with pytest.raises(ValueError):
          estimator.set_hyperparameters(max_leaf_nodes=100001)
  
imports: from __future__ import absolute_import
  import copy
  import datetime
  import pytest
  from mock import Mock, patch
  from sagemaker.algorithm import AlgorithmEstimator
  from sagemaker.estimator import _TrainingJob
  from sagemaker.transformer import Transformer
label_desc: Use image node_id 9 for calling a global function with example usage: test_algorithm_hyperparameter_integer_range_invalid_range(session) without return types