code: def remove_repeated_comments(node):
    
    last_comment = {'text': None}
    for _node in gast.walk(node):
      if anno.hasanno(_node, 'comment'):
        comment = anno.getanno(_node, 'comment')
        if comment['text'] == last_comment['text']:
          anno.delanno(_node, 'comment')
        last_comment = comment
    return node
docs: Remove comments that repeat themselves.
  
    Multiple statements might be annotated with the same comment. This way if one
    of the statements is deleted during optimization passes, the comment won't be
    lost. This pass removes sequences of identical comments, leaving only the
    first one.
  
    Args:
      node: An AST
  
    Returns:
      An AST where comments are not repeated in sequence.