code: def range_validator(min_value, max_value):
      """
      A parameter validator that checks range constraint on a parameter.
  
      :param min_value: The minimum limit of the range, inclusive. None for no minimum limit.
      :param max_value: The maximum limit of the range, inclusive. None for no maximum limit.
      :return: A new range validator.
      """
  
      def _range_validator(instance, attribute, value):
          if ((min_value is not None) and (value < min_value)) or (
              (max_value is not None) and (value > max_value)
          ):
              raise ValueError(
                  "{} must be in range [{}, {}]".format(
                      attribute.name, min_value, max_value
                  )
              )
  
      return _range_validator
  
file_path: clearml/clearml/task_parameters.py
imports: import six
  import attr
  from attr import validators
label_desc: Use image node_id 2 for calling a global function with example usage: range_validator(min_value, max_value) and returns: _range_validator