<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def updateMetadata(self, new):
 """ Update the metadata stored for this broker. Future connections made to the broker will use the host and port defined in the new metadata. Any existing connection is not dropped, however. :param new: :clas:`afkak.common.BrokerMetadata` with the same node ID as the current metadata. """

        if self.node_id != new.node_id:
            raise ValueError("Broker metadata {!r} doesn't match node_id={}".format(new, self.node_id))

        self.node_id = new.node_id
        self.host = new.host
        self.port = new.port