code: def normalize_address(self, hostname):
          
          if config_get('prefer-ipv6'):
              # TODO: add support for ipv6 dns
              return hostname
  
          if hostname != unit_get('private-address'):
              return get_host_ip(hostname, fallback=hostname)
  
          # Otherwise assume localhost
          return '127.0.0.1'
docs: Ensure that address returned is an IP address (i.e. not fqdn)