<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def url_generator(network=None, path=''):
 """ Return a tuple of URLs with path, one for each host on network `network` - IP address and subnet mask compatible with [ipaddress library](https://docs.python.org/3/library/ipaddress.html#ipaddress.ip_network) `path` - Path portion of a URL as defined by [url(un)split](https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit) """

    network_object = ipaddress.ip_network(network)
    if network_object.num_addresses > 256:
        # will need to batch process this case otherwise we run out of selectors
        logger.error('Scan limited to 256 addresses, requested %d.', network_object.num_addresses)
        raise NotImplementedError
    elif network_object.num_addresses > 1:
        # async request upto 256 hosts
        network_hosts = network_object.hosts()
    else:
        # assume user intent was a single IP address
        network_hosts = [network_object.network_address]
    return (urlunsplit(('http',str(ip),path,'','')) for ip in network_hosts)