code: def test_mutually_left_recursive(self) -> None:
      grammar_source = """
          start: foo 'E'
          foo: bar 'A' | 'B'
          bar: foo 'C' | 'D'
          """
      grammar: Grammar = parse_string(grammar_source, GrammarParser)
      out = io.StringIO()
      genr = PythonParserGenerator(grammar, out)
      rules = grammar.rules
      self.assertFalse(rules["start"].left_recursive)
      self.assertTrue(rules["foo"].left_recursive)
      self.assertTrue(rules["bar"].left_recursive)
      genr.generate("<string>")
      ns: Dict[str, Any] = {}
      exec(out.getvalue(), ns)
      parser_class: Type[Parser] = ns["GeneratedParser"]
      node = parse_string("D A C A E", parser_class)
  
      self.assertEqual(
          node,
          [
              [
                  [
                      [
                          TokenInfo(
                              type=NAME,
                              string="D",
                              start=(1, 0),
                              end=(1, 1),
                              line="D A C A E",
                          ),
                          TokenInfo(
                              type=NAME,
                              string="A",
                              start=(1, 2),
                              end=(1, 3),
                              line="D A C A E",
                          ),
                      ],
                      TokenInfo(
                          type=NAME,
                          string="C",
                          start=(1, 4),
                          end=(1, 5),
                          line="D A C A E",
                      ),
                  ],
                  TokenInfo(
                      type=NAME,
                      string="A",
                      start=(1, 6),
                      end=(1, 7),
                      line="D A C A E",
                  ),
              ],
              TokenInfo(
                  type=NAME,
                  string="E",
                  start=(1, 8),
                  end=(1, 9),
                  line="D A C A E",
              ),
          ],
      )
      node = parse_string("B C A E", parser_class)
      self.assertEqual(
          node,
          [
              [
                  [
                      TokenInfo(
                          type=NAME,
                          string="B",
                          start=(1, 0),
                          end=(1, 1),
                          line="B C A E",
                      ),
                      TokenInfo(
                          type=NAME,
                          string="C",
                          start=(1, 2),
                          end=(1, 3),
                          line="B C A E",
                      ),
                  ],
                  TokenInfo(
                      type=NAME,
                      string="A",
                      start=(1, 4),
                      end=(1, 5),
                      line="B C A E",
                  ),
              ],
              TokenInfo(
                  type=NAME,
                  string="E",
                  start=(1, 6),
                  end=(1, 7),
                  line="B C A E",
              ),
          ],
      )
  
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 19 for calling the TestPegen obj's underlying member method code with example usage: obj.test_mutually_left_recursive() without return types