code: def validate_range_value(value):
      
      if value == (None, None):
          return
  
      if not hasattr(value, '__iter__'):
          raise TypeError('Range value must be an iterable, got "%s".' % value)
      if not 2 == len(value):
          raise ValueError('Range value must consist of two elements, got %d.' %
                           len(value))
      if not all(isinstance(x, (int,float)) for x in value):
          raise TypeError('Range value must consist of two numbers, got "%s" '
                          'and "%s" instead.' % value)
      if not value[0] <= value[1]:
          raise ValueError('Range must consist of min and max values (min <= '
                           'max) but got "%s" and "%s" instead.' % value)
      return
docs: Validates given value against `Schema.TYPE_RANGE` data type. Raises
      TypeError or ValueError if something is wrong. Returns None if everything
      is OK.