@acquire<EOL><INDENT>def stats(self, conn, args=None):<DEDENT>
<EOL>if args is None:<EOL><INDENT>args = b'<STR_LIT>'<EOL><DEDENT>conn.writer.write(b'<STR_LIT>'.join((b'<STR_LIT>', args, b'<STR_LIT:\r\n>')))<EOL>result = {}<EOL>resp = yield from conn.reader.readline()<EOL>while resp != b'<STR_LIT>':<EOL><INDENT>terms = resp.split()<EOL>if len(terms) == <NUM_LIT:2> and terms[<NUM_LIT:0>] == b'<STR_LIT>':<EOL><INDENT>result[terms[<NUM_LIT:1>]] = None<EOL><DEDENT>elif len(terms) == <NUM_LIT:3> and terms[<NUM_LIT:0>] == b'<STR_LIT>':<EOL><INDENT>result[terms[<NUM_LIT:1>]] = terms[<NUM_LIT:2>]<EOL><DEDENT>elif len(terms) >= <NUM_LIT:3> and terms[<NUM_LIT:0>] == b'<STR_LIT>':<EOL><INDENT>result[terms[<NUM_LIT:1>]] = b'<STR_LIT:U+0020>'.join(terms[<NUM_LIT:2>:])<EOL><DEDENT>else:<EOL><INDENT>raise ClientException('<STR_LIT>', resp)<EOL><DEDENT>resp = yield from conn.reader.readline()<EOL><DEDENT>return result<EOL>
Runs a stats command on the server.