code: def constrain_cfgdict_list(cfgdict_list_, constraint_func):
      
      cfgdict_list = []
      for cfg_ in cfgdict_list_:
          cfg = cfg_.copy()
          if constraint_func(cfg) is not False and len(cfg) > 0:
              if cfg not in cfgdict_list:
                  cfgdict_list.append(cfg)
      return cfgdict_list
docs: constrains configurations and removes duplicates