def METHOD_NAME(self, doc, prev=None):
    if prev:
        bookmarks.bookmarks(prev).marksChanged.disconnect(self.updateMarkStatus)
    bookmarks.bookmarks(doc).marksChanged.connect(self.updateMarkStatus)