#NEWLINE# @ classmethod #NEWLINE# def validate_schema( cls , data , schema ) : #NEWLINE# #INDENT# 'Validate a given data with a given schema.\n\n        :param data:   a data to validate represented as a dict\n        :param schema: a schema to validate represented as a dict;\n                       must be in JSON Schema Draft 4 format.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# checker = jsonschema . FormatChecker ( ) #NEWLINE# jsonschema . validate ( data , cls , format_checker = checker ) #NEWLINE# #UNINDENT# except Exception as exc : #NEWLINE# #INDENT# raise errors . InvalidData ( str ( exc ) )