def METHOD_NAME(self, key=None):
    if key is not None:
        self.qrefs[key].METHOD_NAME()
    else:
        for qref in self.qrefs.values():
            qref.METHOD_NAME()
        self.qrefs = {}