def get_root_schema_dict(record):
state = SchemaGeneratorState()<EOL>schema = get_schema_dict(record, state)<EOL>del state.record_schemas[record._schema_name]<EOL>if state.record_schemas:<EOL><INDENT>schema['<STR_LIT>'] = dict()<EOL>for name, sub_schema in state.record_schemas.iteritems():<EOL><INDENT>schema['<STR_LIT>'][name] = sub_schema<EOL><DEDENT><DEDENT>return schema<EOL>
Return a root jsonschema for a given record

    A root schema includes the $schema attribute and all sub-record
    schemas and definitions.