code: def rename(self, old_host, new_host):
          
          if new_host in self.hosts_:
              raise ValueError("Host %s: already exists." % new_host)
          for line in self.lines_:  # update lines
              if line.host == old_host:
                  line.host = new_host
                  if line.key.lower() == "host":
                      line.value = new_host
                      line.line = "Host %s" % new_host
          self.hosts_.remove(old_host)  # update host cache
          self.hosts_.add(new_host)
docs: Renames a host configuration.
  
          Parameters
          ----------
          old_host : the host to rename.
          new_host : the new host value