def block_close(self, line): m = END_RE.match(line) return m and m.group('label') == 'algorithm'
def block_close(self, line): m = END_RE.match(line) return m and m.group('label') == self.name