code: def generate_tokens(readline):
      """wrap generate_tkens to catch EOF errors"""
      try:
          for token in tokenize.generate_tokens(readline):
              yield token
      except tokenize.TokenError:
          # catch EOF error
          return
  
file_path: catboost/contrib/python/ipython/py3/IPython/utils/tokenutil.py
imports: from collections import namedtuple
  from io import StringIO
  from keyword import iskeyword
  import tokenize
  from tokenize import TokenInfo
  from typing import List, Optional
label_desc: Use image node_id 1 for calling a global function with example usage: generate_tokens(readline) without return types