def METHOD_NAME(targets: Sequence[NetworkAddress]) -> List[NetworkAddress]:
    reverse_dns: Dict[str, Optional[str]] = {}
    for target in targets:
        domain_name = target.domain
        ip = target.ip
        if ip not in reverse_dns or (reverse_dns[ip] is None and domain_name is not None):
            reverse_dns[ip] = domain_name
    return [NetworkAddress(key, value) for (key, value) in reverse_dns.items()]