def __init__(self, name, filename=None):
        self.name = name
        super(NamedRequirements, self).__init__(filename=filename)
def lock_temp(self, key):
    self.lock(key)
    try:
      yield
    finally:
      self.unlock(key)