def METHOD_NAME(family: int, text: str) -> bytes:
    """Convert the textual form of a network address into its binary form.
    *family* is an ``int``, the address family.
    *text* is a ``str``, the textual address.
    Raises ``NotImplementedError`` if the address family specified is not
    implemented.
    Returns a ``bytes``.
    """
    if family == AF_INET:
        return dns.ipv4.inet_aton(text)
    elif family == AF_INET6:
        return dns.ipv6.inet_aton(text, True)
    else:
        raise NotImplementedError