'Returns a tuple (host, new), where ``host`` is a Host
instance, and ``new`` is a bool indicating whether
the host was newly added.'

def add_or_return_host(self, host):

    with self._hosts_lock:
        try:
            return (self._hosts[host.address], False)
        except KeyError:
            self._hosts[host.address] = host
            return (host, True)
