code: def _collectStatements(self, doc, tables):
      # Collect and sort group definitions first, to make sure a group
      # definition that references other groups comes after them since VOLT
      # does not enforce such ordering, and feature file require it.
      groups = [
          s
          for s in doc.statements
          if isinstance(s, VAst.GroupDefinition)
      ]
      for statement in sorted(groups, key=lambda x: Group(x)):
          self._groupDefinition(statement)
  
      for statement in doc.statements:
          if isinstance(statement, VAst.GlyphDefinition):
              self._glyphDefinition(statement)
          elif isinstance(statement, VAst.AnchorDefinition):
              if "GPOS" in tables:
                  self._anchorDefinition(statement)
          elif isinstance(statement, VAst.SettingDefinition):
              self._settingDefinition(statement)
          elif isinstance(statement, VAst.GroupDefinition):
              pass  # Handled above
          elif isinstance(statement, VAst.ScriptDefinition):
              self._scriptDefinition(statement)
          elif not isinstance(statement, VAst.LookupDefinition):
              raise NotImplementedError(statement)
  
      # Lookup definitions need to be handled last as they reference glyph
      # and mark classes that might be defined after them.
      for statement in doc.statements:
          if isinstance(statement, VAst.LookupDefinition):
              if statement.pos and "GPOS" not in tables:
                  continue
              if statement.sub and "GSUB" not in tables:
                  continue
              self._lookupDefinition(statement)
  
imports: import logging
  import re
  from io import StringIO
  from fontTools.feaLib import ast
  from fontTools.ttLib import TTFont, TTLibError
  from fontTools.voltLib import ast
  from fontTools.voltLib.parser import Parser
label_desc: Use image node_id 4 for calling the VoltToFea obj's underlying member method code with example usage: obj._collectStatements(doc, tables) without return types