code: def select_with_condition(self, condition, key=None):
          
          condition = Condition.as_condition(condition)
          new_confs = []
  
          for conf in self:
              # Select the object on which condition is applied
              obj = conf if key is None else AttrDict(conf[key])
              add_it = condition(obj=obj)
              #if key is "vars": print("conf", conf, "added:", add_it)
              if add_it: new_confs.append(conf)
  
          self._confs = new_confs
docs: Remove all the configurations that do not satisfy the given condition.
  
              Args:
                  condition: dict or :class:`Condition` object with operators expressed with a Mongodb-like syntax
                  key: Selects the sub-dictionary on which condition is applied, e.g. key="vars"
                      if we have to filter the configurations depending on the values in vars