code: def _convert_typehint(tokens):
      names = []
      opening_bracket_reached = False
      for token in tokens:
          # omit the tokens before the opening bracket
          if not opening_bracket_reached:
              if token.string == "(":
                  opening_bracket_reached = True
              else:
                  continue
  
          if token.type == 1:  # type 1 means NAME token
              names.append(token)
          else:
              if len(names) == 1:
                  yield (names[0].type, names[0].string)
              elif len(names) == 2:
                  # two "NAME" tokens follow each other which means a cython
                  # typehint like `bool argument`, so remove the typehint
                  # note that we could convert it to python typehints, but hints
                  # are not supported by _signature_fromstr
                  yield (names[1].type, names[1].string)
              elif len(names) > 2:
                  raise ValueError(
                      "More than two NAME tokens follow each other"
                  )
              names = []
              yield (token.type, token.string)
  
imports: from contextlib import contextmanager
  from enum import EnumMeta
  import inspect
  import tokenize
  from ..compat import _get_module
  from ..utils.logger import logger
  from ..utils.command import Command, capture_stdout, default_bin
label_desc: Use image node_id 2 for calling a global function with example usage: _convert_typehint(tokens) without return types