def METHOD_NAME(text: str) -> int:
    """Determine the address family of a textual-form network address.
    *text*, a ``str``, the textual address.
    Raises ``ValueError`` if the address family cannot be determined
    from the input.
    Returns an ``int``.
    """
    try:
        dns.ipv4.inet_aton(text)
        return AF_INET
    except Exception:
        try:
            dns.ipv6.inet_aton(text, True)
            return AF_INET6
        except Exception:
            raise ValueError