<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_address(hypervisor, configuration):
 """Generate a valid IP address according to the configuration."""

    ipv4 = configuration['ipv4']
    prefix = configuration['prefix']
    subnet_prefix = configuration['subnet_prefix']
    subnet_address = ipaddress.IPv4Network(u'/'.join((str(ipv4), str(prefix))))
    net_address_pool = subnet_address.subnets(new_prefix=subnet_prefix)

    return address_lookup(hypervisor, net_address_pool)