<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_machines_cache_from_dns(self, host, port):
 """One host might be resolved into multiple ip addresses. We will make list out of it"""

        if self.protocol == 'http':
            ret = []
            for af, _, _, _, sa in self._dns_resolver.resolve(host, port):
                host, port = sa[:2]
                if af == socket.AF_INET6:
                    host = '[{0}]'.format(host)
                ret.append(uri(self.protocol, host, port))
            if ret:
                return list(set(ret))
        return [uri(self.protocol, host, port)]