<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_address(network, address):
 """Sets the given address to the network XML element. Libvirt bridge will have address and DHCP server configured according to the subnet prefix length. """

    if network.find('.//ip') is not None:
        raise RuntimeError("Address already specified in XML configuration.")

    netmask = str(address.netmask)
    ipv4 = str(address[1])
    dhcp_start = str(address[2])
    dhcp_end = str(address[-2])
    ip = etree.SubElement(network, 'ip', address=ipv4, netmask=netmask)
    dhcp = etree.SubElement(ip, 'dhcp')

    etree.SubElement(dhcp, 'range', start=dhcp_start, end=dhcp_end)