code: def clip_to_dtype_value_range_(
      array, dtype, validate=True, validate_values=None
  ):
      dtype = normalize_dtype(dtype)
      min_value, _, max_value = get_value_range_of_dtype(dtype)
      if validate:
          array_val = array
          if ia.is_single_integer(validate):
              assert validate >= 1, (
                  "If 'validate' is an integer, it must have a value >=1, "
                  "got %d instead." % (validate,)
              )
              assert validate_values is None, (
                  "If 'validate' is an integer, 'validate_values' must be "
                  "None. Got type %s instead."
                  % (type(validate_values),)
              )
              array_val = array.flat[0:validate]
          if validate_values is not None:
              min_value_found, max_value_found = validate_values
          else:
              min_value_found = np.min(array_val)
              max_value_found = np.max(array_val)
          assert min_value <= min_value_found <= max_value, (
              "Minimum value of array is outside of allowed value range (%.4f "
              "vs %.4f to %.4f)."
              % (min_value_found, min_value, max_value)
          )
          assert min_value <= max_value_found <= max_value, (
              "Maximum value of array is outside of allowed value range (%.4f "
              "vs %.4f to %.4f)."
              % (max_value_found, min_value, max_value)
          )
  
      return clip_(array, min_value, max_value)
  
imports: from __future__ import print_function, division, absolute_import
  import numpy
  import six.moves
  import imgaug
label_desc: Use image node_id 13 for calling a global function with example usage: clip_to_dtype_value_range_(array, dtype, validate, validate_values) and returns: clip_