class_docstr: :param string: The input string.
  :param re_matches: List of (compiled_re_pattern, re_match) tuples.
  :param group_names_to_nodes: Dictionary mapping all the re group names to the matching Node instances.
docstr: Return a list of (varname, reg) tuples.
docstr_tok: ["Return","a","list","of","(","varname",",","reg",")","tuples","."]
code: def _nodes_to_regs(self):
      """
      Return a list of (varname, reg) tuples.
      """
  
      def get_tuples():
          for r, re_match in self._re_matches:
              for group_name, group_index in r.groupindex.items():
                  if group_name != _INVALID_TRAILING_INPUT:
                      reg = re_match.regs[group_index]
                      node = self._group_names_to_nodes[group_name]
                      yield (node, reg)
  
      return list(get_tuples())
  
imports: from __future__ import unicode_literals
  import re
  from six.moves import range
  from .regex_parser import Any, Sequence, Regex, Variable, Repeat, Lookahead
  from .regex_parser import parse_regex, tokenize_regex
label_desc: Use image node_id 2 for calling the Match obj's underlying member method code with example usage: obj._nodes_to_regs() and returns: list