code: def stats(self, conn, args=None):
          
          # req  - stats [additional args]\r\n
          # resp - STAT <name> <value>\r\n (one per result)
          #        END\r\n
          if args is None:
              args = b''
  
          conn.writer.write(b''.join((b'stats ', args, b'\r\n')))
  
          result = {}
  
          resp = yield from conn.reader.readline()
          while resp != b'END\r\n':
              terms = resp.split()
  
              if len(terms) == 2 and terms[0] == b'STAT':
                  result[terms[1]] = None
              elif len(terms) == 3 and terms[0] == b'STAT':
                  result[terms[1]] = terms[2]
              elif len(terms) >= 3 and terms[0] == b'STAT':
                  result[terms[1]] = b' '.join(terms[2:])
              else:
                  raise ClientException('stats failed', resp)
  
              resp = yield from conn.reader.readline()
  
          return result
docs: Runs a stats command on the server.