code: def test_left_recursive(self) -> None:
      grammar_source = """
          start: expr NEWLINE
          expr: ('-' term | expr '+' term | term)
          term: NUMBER
          foo: NAME+
          bar: NAME*
          baz: NAME?
          """
      grammar: Grammar = parse_string(grammar_source, GrammarParser)
      parser_class = generate_parser(grammar)
      rules = grammar.rules
      self.assertFalse(rules["start"].left_recursive)
      self.assertTrue(rules["expr"].left_recursive)
      self.assertFalse(rules["term"].left_recursive)
      self.assertFalse(rules["foo"].left_recursive)
      self.assertFalse(rules["bar"].left_recursive)
      self.assertFalse(rules["baz"].left_recursive)
      node = parse_string("1 + 2 + 3\n", parser_class)
      self.assertEqual(
          node,
          [
              [
                  [
                      TokenInfo(
                          NUMBER,
                          string="1",
                          start=(1, 0),
                          end=(1, 1),
                          line="1 + 2 + 3\n",
                      ),
                      TokenInfo(
                          OP,
                          string="+",
                          start=(1, 2),
                          end=(1, 3),
                          line="1 + 2 + 3\n",
                      ),
                      TokenInfo(
                          NUMBER,
                          string="2",
                          start=(1, 4),
                          end=(1, 5),
                          line="1 + 2 + 3\n",
                      ),
                  ],
                  TokenInfo(
                      OP,
                      string="+",
                      start=(1, 6),
                      end=(1, 7),
                      line="1 + 2 + 3\n",
                  ),
                  TokenInfo(
                      NUMBER,
                      string="3",
                      start=(1, 8),
                      end=(1, 9),
                      line="1 + 2 + 3\n",
                  ),
              ],
              TokenInfo(
                  NEWLINE,
                  string="\n",
                  start=(1, 9),
                  end=(1, 10),
                  line="1 + 2 + 3\n",
              ),
          ],
      )
  
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 15 for calling the TestPegen obj's underlying member method code with example usage: obj.test_left_recursive() without return types