def clear(self):
        super(GroupedRequirements, self).clear()
        self.create_default_groups()
def lock_temp(self, key):
    self.lock(key)
    try:
      yield
    finally:
      self.unlock(key)