def _get_ips(ips_as_string):
    """Returns viable v4 and v6 IPs from a space separated string."""
    ips = ips_as_string.split(" ")[1:]    # skip the header
    ips_v4, ips_v6 = [], []
    # There is no guarantee if all the IPs are valid and sorted by type.
    for ip in ips:
        if not ip:
            continue
        if "." in ip and ":" not in ip:
            ips_v4.append(ip)
        else:
            ips_v6.append(ip)
    return ips_v4, ips_v6