code: def test_repeated_rules(self) -> None:
      grammar_source = """
          start: the_rule NEWLINE
          the_rule: 'b' NEWLINE
          the_rule: 'a' NEWLINE
          """
      with self.assertRaisesRegex(
          GrammarError, "Repeated rule 'the_rule'"
      ):
          parse_string(grammar_source, GrammarParser)
  
imports: import ast
  import difflib
  import io
  import textwrap
  import unittest
  from test import test_tools
  from typing import Dict, Any
  from tokenize import TokenInfo, NAME, NEWLINE, NUMBER, OP
label_desc: Use image node_id 2 for calling the TestPegen obj's underlying member method code with example usage: obj.test_repeated_rules() without return types