def guess_altname_prefix(string):
    if string in "@":
        return "email"
    elif "://" in string:
        return "URI"
    elif "::" in string:
        return "IP"  # ipv6
    elif re.search(br"(?:\D+\.)+\D{1,4}", string, re.I):
        return "DNS"
    elif re.search(br"(?:[0-9]{1,3}\.)+\d{1,3}", string):
        return "IP"
    else:
        raise ValueError("Unabled to determine altname type")
dataset/ETHPy150Open kdart/pycopia/net/pycopia/ssl/certs.py/guess_altname_prefix/swapped operands of `in`