code: def generate_tokens(text):
      # type: (str) -> Iterator[TokenInfo]
      """
      Generates standard library tokens for the given code.
      """
      # tokenize.generate_tokens is technically an undocumented API for Python3, but allows us to use the same API as for
      # Python2. See http://stackoverflow.com/a/4952291/328565.
      # FIXME: Remove cast once https://github.com/python/typeshed/issues/7003 gets fixed
      return tokenize.generate_tokens(
          cast(Callable[[], str], io.StringIO(text).readline)
      )
  
imports: import ast
  import collections
  import io
  import sys
  import token
  import tokenize
  from abc import ABCMeta
  from ast import Module, expr, AST
  from typing import Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, cast, Any, TYPE_CHECKING
  from six import iteritems
label_desc: Use image node_id 4 for calling a global function with example usage: generate_tokens(text) and returns: tokenize