<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_slab_stats(self):
 """Retrieve slab stats from memcached."""

        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((self.host, self.port))
        s.send("stats slabs\n")
        try:
            data = ""
            while True:
                data += s.recv(4096)
                if data.endswith('END\r\n'):
                    break
            return data
        finally:
            s.close()