def METHOD_NAME(self):
    alf.reset_configs()
    alf.config('Conv2dAdapter', rank=32)
    alf.config('LinearAdapter', rank=32)
    net = Net(10)
    # This regex will exclude 'conv1 and 'fc1'
    blacklist = ['.*1']
    pretrained_net = PretrainedModel(
        net,
        adapter_cls=[LinearAdapter, Conv2dAdapter],
        module_blacklist=blacklist)
    for name in pretrained_net.adapted_module_names:
        for b in blacklist:
            assert b not in name
    # because of blacklist, adapters only have two weights
    self.assertEqual(len(list(pretrained_net.parameters())), 2)
    pretrained_net.remove_adapter()
    whitelist = ['.*conv.*']
    pretrained_net = PretrainedModel(
        net,
        adapter_cls=[LinearAdapter, Conv2dAdapter],
        module_whitelist=whitelist)
    # because of whitelist, adapters only have two weights
    self.assertEqual(len(list(pretrained_net.parameters())), 2)