code: def close(self):
          
          if self.sock is not None:
              try:
                  self.sock.close()
              except Exception:
                  pass
              finally:
                  self.sock = None
docs: Close the connection to memcached, if it is open. The next call to a
          method that requires a connection will re-open it.