<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_repeated_comments(node):
 """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. """

  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