def METHOD_NAME(
    self, adapter, switch, bridged, nic0
):
    NET_WITH_IP_ATTRS = {
        'nic': nic0,
        'bridged': bridged,
        'ipaddr': IPv4_ADDRESS,
        'prefix': IPv4_PREFIX_LEN,
        'switch': switch,
    }
    NET_WITHOUT_IP_ATTRS = {
        'nic': nic0,
        'bridged': bridged,
        'switch': switch,
    }
    NET_WITH_IP = {NETWORK_NAME: NET_WITH_IP_ATTRS}
    NET_WITHOUT_IP = {NETWORK_NAME: NET_WITHOUT_IP_ATTRS}
    with adapter.reset_persistent_config():
        with adapter.setupNetworks(NET_WITH_IP, {}, NOCHK):
            adapter.setSafeNetworkConfig()
            adapter.setupNetworks(NET_WITHOUT_IP, {}, NOCHK)
            adapter.assertNetworkIp(NETWORK_NAME, NET_WITHOUT_IP_ATTRS)
            adapter.restore_nets()
            adapter.assertNetworkIp(NETWORK_NAME, NET_WITH_IP_ATTRS)