code: def disconnect(self):
      
      if self.sock is not None:
        try:
          self.sock.close()
        except socket.error:
          pass
        finally:
          self.sock = None
docs: Disconnect from the Graphite server if connected.