code: def _get_socket_addresses(self):
          
          family = socket.AF_UNSPEC
          if not socket.has_ipv6:
              family = socket.AF_INET
          try:
              addresses = socket.getaddrinfo(self._parameters['hostname'],
                                             self._parameters['port'], family,
                                             socket.SOCK_STREAM)
          except socket.gaierror as why:
              raise AMQPConnectionError(why)
          return addresses
docs: Get Socket address information.
  
          :rtype: list