def assign_ip(network_data, ip, mac, family):
    if (mac is not ''):
        if (family == '4'):
            ip = network_data.assign_ip4_address(ip, mac, '', 'MAKE_DHCP_RESERVED')
        else:
            ip = network_data.assign_ip6_address(ip, mac, '', 'MAKE_DHCP_RESERVED')
    elif (family == '4'):
        ip = network_data.assign_ip4_address(ip, '', '', 'MAKE_STATIC')
    else:
        ip = network_data.assign_ip6_address(ip, '', '', 'MAKE_STATIC')
    return ip
def assign_ip(network_data, ip, mac, family):
    if (mac is not ):
        if (family == '4'):
            ip = network_data.assign_ip4_address(ip, mac, , 'MAKE_DHCP_RESERVED')
        else:
            ip = network_data.assign_ip6_address(ip, mac, , 'MAKE_DHCP_RESERVED')
    elif (family == '4'):
        ip = network_data.assign_ip4_address(ip, , , 'MAKE_STATIC')
    else:
        ip = network_data.assign_ip6_address(ip, , , 'MAKE_STATIC')
    return ip