code: def test_optional_literal(self) -> None:
      grammar = """
          start: sum NEWLINE
          sum: '+' ? term
          term: NUMBER
          """
      self.assertEqual(
          self.calculate_first_sets(grammar),
          {
              "term": {"NUMBER"},
              "sum": {"'+'", "NUMBER"},
              "start": {"'+'", "NUMBER"},
          },
      )
  
imports: import unittest
  from test import test_tools
  from typing import Dict, Set
label_desc: Use image node_id 6 for calling the TestFirstSets obj's underlying member method code with example usage: obj.test_optional_literal() without return types