code: def make_label(self, c: PgenGrammar, label: str) -> int:
      # XXX Maybe this should be a method on a subclass of converter?
      ilabel = len(c.labels)
      if label[0].isalpha():
          # Either a symbol name or a named token
          if label in c.symbol2number:
              # A symbol name (a non-terminal)
              if label in c.symbol2label:
                  return c.symbol2label[label]
              else:
                  c.labels.append((c.symbol2number[label], None))
                  c.symbol2label[label] = ilabel
                  return ilabel
          else:
              # A named token (NAME, NUMBER, STRING)
              itoken = getattr(token, label, None)
              assert isinstance(itoken, int), label
              assert itoken in token.tok_name, label
              if itoken in c.tokens:
                  return c.tokens[itoken]
              else:
                  c.labels.append((itoken, None))
                  c.tokens[itoken] = ilabel
                  return ilabel
      else:
          # Either a keyword or an operator
          assert label[0] in ('"', "'"), label
          value = eval(label)
          if value[0].isalpha():
              if label[0] == '"':
                  keywords = c.soft_keywords
              else:
                  keywords = c.keywords
  
              # A keyword
              if value in keywords:
                  return keywords[value]
              else:
                  c.labels.append((token.NAME, value))
                  keywords[value] = ilabel
                  return ilabel
          else:
              # An operator (any non-numeric token)
              itoken = grammar.opmap[value]  # Fails if unknown token
              if itoken in c.tokens:
                  return c.tokens[itoken]
              else:
                  c.labels.append((itoken, None))
                  c.tokens[itoken] = ilabel
                  return ilabel
  
imports: import os
  from typing import IO, Any, Dict, Iterator, List, NoReturn, Optional, Sequence, Tuple, Union
  from blib2to3.pgen2 import grammar, token, tokenize
  from blib2to3.pgen2.tokenize import GoodTokenInfo
  import pkgutil
  import io
label_desc: Use image node_id 4 for calling the ParserGenerator obj's underlying member method code with example usage: obj.make_label(c, label) and returns: c, ilabel, c, ilabel, keywords, ilabel, c, ilabel