code: def validate(schema, value, noun='value'):
      
      errors = schema.errors(value)
      if errors:
          error_details = ''
          for error in errors:
              if error.pointer:
                  error_details += '  - %s: %s\n' % (error.pointer, error.message)
              else:
                  error_details += '  - %s\n' % error.message
          raise ValidationError('Invalid %s:\n%s' % (noun, error_details))
docs: Checks the value against the schema, and raises ValidationError if validation
      fails.