def check_docstring(cls):
docstring = inspect.getdoc(cls)<EOL>if not docstring:<EOL><INDENT>breadcrumbs = "<STR_LIT>".join(t.__name__ for t in inspect.getmro(cls)[:-<NUM_LIT:1>][::-<NUM_LIT:1>])<EOL>msg = "<STR_LIT>"<EOL>args = (cls.__name__, breadcrumbs, cls.__module__)<EOL>raise InternalCashewException(msg % args)<EOL><DEDENT>max_line_length = cls._class_settings.get('<STR_LIT>')<EOL>if max_line_length:<EOL><INDENT>for i, line in enumerate(docstring.splitlines()):<EOL><INDENT>if len(line) > max_line_length:<EOL><INDENT>msg = "<STR_LIT>" <EOL>args = (i, cls.__name__, len(line) - max_line_length)<EOL>raise Exception(msg % args)<EOL><DEDENT><DEDENT><DEDENT>return docstring<EOL>
Asserts that the class has a docstring, returning it if successful.