def _validate_stone_cfg(self):
def mk_route_schema():<EOL><INDENT>s = Struct('<STR_LIT>', ApiNamespace('<STR_LIT>'), None)<EOL>s.set_attributes(None, [], None)<EOL>return s<EOL><DEDENT>try:<EOL><INDENT>stone_cfg = self.api.namespaces.pop('<STR_LIT>')<EOL><DEDENT>except KeyError:<EOL><INDENT>return mk_route_schema()<EOL><DEDENT>if stone_cfg.routes:<EOL><INDENT>route = stone_cfg.routes[<NUM_LIT:0>]<EOL>raise InvalidSpec(<EOL>'<STR_LIT>',<EOL>route._ast_node.lineno,<EOL>route._ast_node.path,<EOL>)<EOL><DEDENT>if not stone_cfg.data_types:<EOL><INDENT>return mk_route_schema()<EOL><DEDENT>for data_type in stone_cfg.data_types:<EOL><INDENT>if data_type.name != '<STR_LIT>':<EOL><INDENT>raise InvalidSpec(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>data_type._ast_node.lineno,<EOL>data_type._ast_node.path,<EOL>)<EOL><DEDENT><DEDENT>return data_type<EOL>
Returns:
     Struct: A schema for route attributes.