def check_end_doc_comment(self, end_event, node):
    if (end_event.comment and end_event.comment[1]):
        if (node.comment is None):
            node.comment = [None, None]
        assert (not isinstance(node, ScalarEvent))
        node.comment.append(end_event.comment[1])
        end_event.comment[1] = None
def check_end_doc_comment(self, end_event, node):
    if (end_event.comment and end_event.comment[1]):
        if (node.comment is None):
            node.comment = [None, None]
        assert (not isinstance(node, ScalarEvent))
        node.comment.append(end_event.comment[1])
        end_event.comment[1] = None