<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isInNet(host, pattern, mask):
 """ Pattern and mask specification is done the same way as for SOCKS configuration. :param str host: a DNS hostname, or IP address. If a hostname is passed, it will be resolved into an IP address by this function. :param str pattern: an IP address pattern in the dot-separated format :param str mask: mask for the IP address pattern informing which parts of the IP address should be matched against. 0 means ignore, 255 means match. :returns: True iff the IP address of the host matches the specified IP address pattern. :rtype: bool """

    host_ip = host if is_ipv4_address(host) else dnsResolve(host)
    if not host_ip or not is_ipv4_address(pattern) or not is_ipv4_address(mask):
        return False
    return _address_in_network(host_ip, pattern, mask)