code: def test_check_parameter_range(self):
      # verify parameter type correction
      with assert_raises(TypeError):
          check_parameter("f", 0, 100)
  
      with assert_raises(TypeError):
          check_parameter(1, "f", 100)
  
      with assert_raises(TypeError):
          check_parameter(1, 0, "f")
  
      with assert_raises(TypeError):
          check_parameter(argmaxn(value_list=[1, 2, 3], n=1), 0, 100)
  
      # if low and high are both unset
      with assert_raises(ValueError):
          check_parameter(50)
  
      # if low <= high
      with assert_raises(ValueError):
          check_parameter(50, 100, 99)
  
      with assert_raises(ValueError):
          check_parameter(50, 100, 100)
  
      # check one side
      with assert_raises(ValueError):
          check_parameter(50, low=100)
      with assert_raises(ValueError):
          check_parameter(50, high=0)
  
      assert_equal(True, check_parameter(50, low=10))
      assert_equal(True, check_parameter(50, high=100))
  
      # if check fails
      with assert_raises(ValueError):
          check_parameter(-1, 0, 100)
  
      with assert_raises(ValueError):
          check_parameter(101, 0, 100)
  
      with assert_raises(ValueError):
          check_parameter(0.5, 0.2, 0.3)
  
      # if check passes
      assert_equal(True, check_parameter(50, 0, 100))
  
      assert_equal(True, check_parameter(0.5, 0.1, 0.8))
  
      # if includes left or right bounds
      with assert_raises(ValueError):
          check_parameter(
              100, 0, 100, include_left=False, include_right=False
          )
      assert_equal(
          True,
          check_parameter(
              0, 0, 100, include_left=True, include_right=False
          ),
      )
      assert_equal(
          True,
          check_parameter(
              0, 0, 100, include_left=True, include_right=True
          ),
      )
      assert_equal(
          True,
          check_parameter(
              100, 0, 100, include_left=False, include_right=True
          ),
      )
      assert_equal(
          True,
          check_parameter(
              100, 0, 100, include_left=True, include_right=True
          ),
      )
  
imports: from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import unittest
  import numpy
  from numpy.testing import assert_allclose
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises
  from sklearn.metrics import precision_score
  from sklearn.utils import check_random_state
  from pyod.utils.utility import check_parameter
  from pyod.utils.utility import standardizer
  from pyod.utils.utility import get_label_n
  from pyod.utils.utility import precision_n_scores
  from pyod.utils.utility import argmaxn
  from pyod.utils.utility import get_list_diff
  from pyod.utils.utility import get_diff_elements
  from pyod.utils.utility import get_intersection
  from pyod.utils.utility import invert_order
  from pyod.utils.utility import check_detector
  from pyod.utils.utility import score_to_label
label_desc: Use image node_id 2 for calling the TestParameters obj's underlying member method code with example usage: obj.test_check_parameter_range() without return types